< prev index next >

src/java.base/share/classes/java/security/SecureRandom.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

@@ -940,11 +940,11 @@
                     return Security.getProperty(
                         "securerandom.strongAlgorithms");
                 }
             });
 
-        if ((property == null) || (property.length() == 0)) {
+        if (property == null || property.isEmpty()) {
             throw new NoSuchAlgorithmException(
                 "Null/empty securerandom.strongAlgorithms Security Property");
         }
 
         String remainder = property;
< prev index next >