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

Print this page

        

*** 28,37 **** --- 28,38 ---- 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,157 **** 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())); } public int hashCode() { return getName().hashCode() ^ getDescription().hashCode() ^ getDescriptor().hashCode(); --- 146,158 ---- if (o == this) return true; if (!(o instanceof MBeanFeatureInfo)) return false; MBeanFeatureInfo p = (MBeanFeatureInfo) o; ! 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();