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