Merge "Remove raw references to Map in XSQL"
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / JmxAttribute.java
index 96deb051ef91a1f1f4a3d629fc7984626ddf0dc9..7ce602ae49685600ec4d9a990465ce2ce69398b4 100644 (file)
@@ -15,34 +15,40 @@ public class JmxAttribute {
     private final String attributeName;
 
     public JmxAttribute(String attributeName) {
-        if (attributeName == null)
+        if (attributeName == null) {
             throw new NullPointerException("Parameter 'attributeName' is null");
+        }
         this.attributeName = attributeName;
     }
 
+    /**
+     * Name of attribute in JMX.
+     */
     public String getAttributeName() {
         return attributeName;
     }
 
     @Override
     public boolean equals(Object o) {
-        if (this == o)
+        if (this == o) {
             return true;
-        if (o == null || getClass() != o.getClass())
+        }
+        if (o == null || getClass() != o.getClass()) {
             return false;
+        }
 
         JmxAttribute that = (JmxAttribute) o;
 
-        if (attributeName != null ? !attributeName.equals(that.attributeName)
-                : that.attributeName != null)
+        if (!attributeName.equals(that.attributeName)) {
             return false;
+        }
 
         return true;
     }
 
     @Override
     public int hashCode() {
-        return attributeName != null ? attributeName.hashCode() : 0;
+        return attributeName.hashCode();
     }
 
     @Override