Fix checkstyle issues to enforce it
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / ModuleIdentifier.java
index f5ccb4a53cb6bcb07ef3d547d950fa9e76720fa8..600c9eeaec62ff71e504d52ffe2bd79f4c8d24e9 100644 (file)
@@ -7,17 +7,20 @@
  */
 package org.opendaylight.controller.config.api;
 
-public class ModuleIdentifier {
+import org.opendaylight.yangtools.concepts.Identifier;
+
+public class ModuleIdentifier implements Identifier {
     private static final long serialVersionUID = 1L;
-    private final String factoryName, instanceName;
-
-    public ModuleIdentifier(String factoryName, String instanceName) {
-        if (factoryName == null)
-            throw new IllegalArgumentException(
-                    "Parameter 'factoryName' is null");
-        if (instanceName == null)
-            throw new IllegalArgumentException(
-                    "Parameter 'instanceName' is null");
+    private final String factoryName;
+    private final String instanceName;
+
+    public ModuleIdentifier(final String factoryName, final String instanceName) {
+        if (factoryName == null) {
+            throw new IllegalArgumentException("Parameter 'factoryName' is null");
+        }
+        if (instanceName == null) {
+            throw new IllegalArgumentException("Parameter 'instanceName' is null");
+        }
         this.factoryName = factoryName;
         this.instanceName = instanceName;
     }
@@ -31,18 +34,22 @@ public class ModuleIdentifier {
     }
 
     @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;
+        }
 
-        ModuleIdentifier that = (ModuleIdentifier) o;
+        ModuleIdentifier that = (ModuleIdentifier) object;
 
-        if (!factoryName.equals(that.factoryName))
+        if (!factoryName.equals(that.factoryName)) {
             return false;
-        if (!instanceName.equals(that.instanceName))
+        }
+        if (!instanceName.equals(that.instanceName)) {
             return false;
+        }
 
         return true;
     }