config-api: final parameters
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / JmxAttribute.java
index 649b1eb4676e6ab7dfc2ef81f8b13d2b74753e15..068322cc89c29b8b927a301a1c26cf19db43afe7 100644 (file)
@@ -14,7 +14,7 @@ package org.opendaylight.controller.config.api;
 public class JmxAttribute {
     private final String attributeName;
 
-    public JmxAttribute(String attributeName) {
+    public JmxAttribute(final String attributeName) {
         if (attributeName == null) {
             throw new NullPointerException("Parameter 'attributeName' is null");
         }
@@ -29,7 +29,7 @@ public class JmxAttribute {
     }
 
     @Override
-    public boolean equals(Object o) {
+    public boolean equals(final Object o) {
         if (this == o) {
             return true;
         }
@@ -39,8 +39,7 @@ public class JmxAttribute {
 
         JmxAttribute that = (JmxAttribute) o;
 
-        if (attributeName != null ? !attributeName.equals(that.attributeName)
-                : that.attributeName != null) {
+        if (!attributeName.equals(that.attributeName)) {
             return false;
         }
 
@@ -49,7 +48,7 @@ public class JmxAttribute {
 
     @Override
     public int hashCode() {
-        return attributeName != null ? attributeName.hashCode() : 0;
+        return attributeName.hashCode();
     }
 
     @Override