< prev index next >

src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

@@ -454,15 +454,15 @@
         OpenType<?> openType = info.getOpenType();
         if (openType == null)
             throw new IllegalArgumentException("OpenType cannot be null");
 
         if (info.getName() == null ||
-                info.getName().trim().equals(""))
+                info.getName().trim().isEmpty())
             throw new IllegalArgumentException("Name cannot be null or empty");
 
         if (info.getDescription() == null ||
-                info.getDescription().trim().equals(""))
+                info.getDescription().trim().isEmpty())
             throw new IllegalArgumentException("Description cannot be null or empty");
 
         // Check and initialize defaultValue
         //
         if (info.hasDefaultValue()) {
< prev index next >