src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java
changeset 53018 8bf9268df0e2
parent 47216 71c04702a3d5
child 58242 94bb65cb37d3
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   226     public static AlgorithmParameterGenerator getInstance(String algorithm,
   226     public static AlgorithmParameterGenerator getInstance(String algorithm,
   227                                                           String provider)
   227                                                           String provider)
   228         throws NoSuchAlgorithmException, NoSuchProviderException
   228         throws NoSuchAlgorithmException, NoSuchProviderException
   229     {
   229     {
   230         Objects.requireNonNull(algorithm, "null algorithm name");
   230         Objects.requireNonNull(algorithm, "null algorithm name");
   231         if (provider == null || provider.length() == 0)
   231         if (provider == null || provider.isEmpty())
   232             throw new IllegalArgumentException("missing provider");
   232             throw new IllegalArgumentException("missing provider");
   233         Object[] objs = Security.getImpl(algorithm,
   233         Object[] objs = Security.getImpl(algorithm,
   234                                          "AlgorithmParameterGenerator",
   234                                          "AlgorithmParameterGenerator",
   235                                          provider);
   235                                          provider);
   236         return new AlgorithmParameterGenerator
   236         return new AlgorithmParameterGenerator