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

Print this page

        

@@ -28,10 +28,11 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.io.StreamCorruptedException;
+import java.util.Objects;
 
 /**
  * <p>Provides general information for an MBean descriptor object.
  * The feature described can be an attribute, an operation, a
  * parameter, or a notification.  Instances of this class are

@@ -145,13 +146,13 @@
         if (o == this)
             return true;
         if (!(o instanceof MBeanFeatureInfo))
             return false;
         MBeanFeatureInfo p = (MBeanFeatureInfo) o;
-        return (p.getName().equals(getName()) &&
-                p.getDescription().equals(getDescription()) &&
-                p.getDescriptor().equals(getDescriptor()));
+        return (Objects.equals(p.getName(), getName()) &&
+                Objects.equals(p.getDescription(), getDescription()) &&
+                Objects.equals(p.getDescriptor(), getDescriptor()));
     }
 
     public int hashCode() {
         return getName().hashCode() ^ getDescription().hashCode() ^
                getDescriptor().hashCode();