src/java.management/share/classes/javax/management/openmbean/OpenType.java
changeset 52902 e3398b2e1ab0
parent 47216 71c04702a3d5
equal deleted inserted replaced
52901:3ba9ff4d4aaf 52902:e3398b2e1ab0
   266     }
   266     }
   267 
   267 
   268     /* Return argValue.trim() provided argValue is neither null nor empty;
   268     /* Return argValue.trim() provided argValue is neither null nor empty;
   269        otherwise throw IllegalArgumentException.  */
   269        otherwise throw IllegalArgumentException.  */
   270     private static String valid(String argName, String argValue) {
   270     private static String valid(String argName, String argValue) {
   271         if (argValue == null || (argValue = argValue.trim()).equals(""))
   271         if (argValue == null || (argValue = argValue.trim()).isEmpty())
   272             throw new IllegalArgumentException("Argument " + argName +
   272             throw new IllegalArgumentException("Argument " + argName +
   273                                                " cannot be null or empty");
   273                                                " cannot be null or empty");
   274         return argValue;
   274         return argValue;
   275     }
   275     }
   276 
   276