src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
changeset 52902 e3398b2e1ab0
parent 47216 71c04702a3d5
child 58766 54ffb15c4839
--- a/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Fri Dec 07 17:11:17 2018 +0100
+++ b/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Fri Dec 07 11:51:17 2018 -0500
@@ -456,11 +456,11 @@
             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