Fix checkstyle issues to enforce it
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / JmxAttribute.java
index 96deb051ef91a1f1f4a3d629fc7984626ddf0dc9..7b67b95d37430f92756325d745791df5687912d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -14,35 +14,41 @@ package org.opendaylight.controller.config.api;
 public class JmxAttribute {
     private final String attributeName;
 
-    public JmxAttribute(String attributeName) {
-        if (attributeName == null)
+    public JmxAttribute(final String attributeName) {
+        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)
+    public boolean equals(final Object object) {
+        if (this == object) {
             return true;
-        if (o == null || getClass() != o.getClass())
+        }
+        if (object == null || getClass() != object.getClass()) {
             return false;
+        }
 
-        JmxAttribute that = (JmxAttribute) o;
+        JmxAttribute that = (JmxAttribute) object;
 
-        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