Fix checkstyle violations in sal-binding-api
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / rpc / RpcContextIdentifier.java
index b4bd6eb6a7782af3aeeb98aec5f88aad3256b232..3bdb432eb88d64ca869694af042c6f8fe5443ad6 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
-public final  class RpcContextIdentifier implements Immutable{
+public final  class RpcContextIdentifier implements Immutable {
 
     public final Class<? extends RpcService> rpcService;
     public final Class<? extends BaseIdentity> routingContext;
@@ -29,11 +29,12 @@ public final  class RpcContextIdentifier implements Immutable{
         return routingContext;
     }
 
-    public static final RpcContextIdentifier contextForGlobalRpc(Class<? extends RpcService> serviceType) {
+    public static RpcContextIdentifier contextForGlobalRpc(Class<? extends RpcService> serviceType) {
         return new RpcContextIdentifier(serviceType, null);
     }
 
-    public static final RpcContextIdentifier contextFor(Class<? extends RpcService> serviceType,Class<? extends BaseIdentity> routingContext) {
+    public static RpcContextIdentifier contextFor(Class<? extends RpcService> serviceType,
+            Class<? extends BaseIdentity> routingContext) {
         return new RpcContextIdentifier(serviceType, routingContext);
     }
 
@@ -41,31 +42,37 @@ public final  class RpcContextIdentifier implements Immutable{
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((routingContext == null) ? 0 : routingContext.hashCode());
-        result = prime * result + ((rpcService == null) ? 0 : rpcService.hashCode());
+        result = prime * result + (routingContext == null ? 0 : routingContext.hashCode());
+        result = prime * result + (rpcService == null ? 0 : rpcService.hashCode());
         return result;
     }
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         RpcContextIdentifier other = (RpcContextIdentifier) obj;
         if (routingContext == null) {
-            if (other.routingContext != null)
+            if (other.routingContext != null) {
                 return false;
-        } else if (!routingContext.equals(other.routingContext))
+            }
+        } else if (!routingContext.equals(other.routingContext)) {
             return false;
+        }
         if (rpcService == null) {
-            if (other.rpcService != null)
+            if (other.rpcService != null) {
                 return false;
-        } else if (!rpcService.equals(other.rpcService))
+            }
+        } else if (!rpcService.equals(other.rpcService)) {
             return false;
+        }
         return true;
     }
-
 }