X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2Frpc%2FRpcContextIdentifier.java;fp=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2Frpc%2FRpcContextIdentifier.java;h=3bdb432eb88d64ca869694af042c6f8fe5443ad6;hp=b4bd6eb6a7782af3aeeb98aec5f88aad3256b232;hb=f1a918f69b787dd422a09e4e8fd83a1d52a72f83;hpb=356ac60051791b56cd28390356906810c0db6024 diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/rpc/RpcContextIdentifier.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/rpc/RpcContextIdentifier.java index b4bd6eb6a7..3bdb432eb8 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/rpc/RpcContextIdentifier.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/rpc/RpcContextIdentifier.java @@ -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 rpcService; public final Class routingContext; @@ -29,11 +29,12 @@ public final class RpcContextIdentifier implements Immutable{ return routingContext; } - public static final RpcContextIdentifier contextForGlobalRpc(Class serviceType) { + public static RpcContextIdentifier contextForGlobalRpc(Class serviceType) { return new RpcContextIdentifier(serviceType, null); } - public static final RpcContextIdentifier contextFor(Class serviceType,Class routingContext) { + public static RpcContextIdentifier contextFor(Class serviceType, + Class 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; } - }