src/java.base/share/classes/java/security/Signature.java
changeset 53018 8bf9268df0e2
parent 51229 17b7d7034e8e
child 53972 43c2ab1bdfd3
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   358     public static Signature getInstance(String algorithm, String provider)
   358     public static Signature getInstance(String algorithm, String provider)
   359             throws NoSuchAlgorithmException, NoSuchProviderException {
   359             throws NoSuchAlgorithmException, NoSuchProviderException {
   360         Objects.requireNonNull(algorithm, "null algorithm name");
   360         Objects.requireNonNull(algorithm, "null algorithm name");
   361         if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) {
   361         if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) {
   362             // exception compatibility with existing code
   362             // exception compatibility with existing code
   363             if ((provider == null) || (provider.length() == 0)) {
   363             if (provider == null || provider.isEmpty()) {
   364                 throw new IllegalArgumentException("missing provider");
   364                 throw new IllegalArgumentException("missing provider");
   365             }
   365             }
   366             Provider p = Security.getProvider(provider);
   366             Provider p = Security.getProvider(provider);
   367             if (p == null) {
   367             if (p == null) {
   368                 throw new NoSuchProviderException
   368                 throw new NoSuchProviderException