src/share/classes/javax/management/MBeanParameterInfo.java

Print this page

        

@@ -25,10 +25,11 @@
 
 package javax.management;
 
 import java.util.Objects;
 
+
 /**
  * Describes an argument of an operation exposed by an MBean.
  * Instances of this class are immutable.  Subclasses may be mutable
  * but this is not recommended.
  *

@@ -135,14 +136,14 @@
         if (o == this)
             return true;
         if (!(o instanceof MBeanParameterInfo))
             return false;
         MBeanParameterInfo p = (MBeanParameterInfo) o;
-        return (p.getName().equals(getName()) &&
-                p.getType().equals(getType()) &&
-                p.getDescription().equals(getDescription()) &&
-                p.getDescriptor().equals(getDescriptor()));
+        return (Objects.equals(p.getName(), getName()) &&
+                Objects.equals(p.getType(), getType()) &&
+                Objects.equals(p.getDescription(), getDescription()) &&
+                Objects.equals(p.getDescriptor(), getDescriptor()));
     }
 
     public int hashCode() {
         return Objects.hash(getName(), getType());
     }