Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Optimize anyxml output
[controller.git]
/
opendaylight
/
md-sal
/
sal-binding-api
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
binding
/
api
/
rpc
/
RpcContextIdentifier.java
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 d6374fff909a2e8972b152269fbbfd8b6ff66a5c..a5d76bef3e48045db575f39d48bdc4787da7857c 100644
(file)
--- 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,13
+11,13
@@
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.binding.BaseIdentity;
import org.opendaylight.yangtools.yang.binding.RpcService;
import org.opendaylight.yangtools.yang.binding.BaseIdentity;
import org.opendaylight.yangtools.yang.binding.RpcService;
-public final class RpcContextIdentifier implements Immutable{
+@Deprecated
+public final class RpcContextIdentifier implements Immutable {
public final Class<? extends RpcService> rpcService;
public final Class<? extends BaseIdentity> routingContext;
public final Class<? extends RpcService> rpcService;
public final Class<? extends BaseIdentity> routingContext;
-
+
private RpcContextIdentifier(Class<? extends RpcService> rpcService, Class<? extends BaseIdentity> routingContext) {
private RpcContextIdentifier(Class<? extends RpcService> rpcService, Class<? extends BaseIdentity> routingContext) {
- super();
this.rpcService = rpcService;
this.routingContext = routingContext;
}
this.rpcService = rpcService;
this.routingContext = routingContext;
}
@@
-29,12
+29,13
@@
public final class RpcContextIdentifier implements Immutable{
public Class<? extends BaseIdentity> getRoutingContext() {
return routingContext;
}
public Class<? extends BaseIdentity> getRoutingContext() {
return routingContext;
}
-
- public static
final
RpcContextIdentifier contextForGlobalRpc(Class<? extends RpcService> serviceType) {
+
+ public static RpcContextIdentifier contextForGlobalRpc(Class<? extends RpcService> serviceType) {
return new RpcContextIdentifier(serviceType, null);
}
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);
}
return new RpcContextIdentifier(serviceType, routingContext);
}
@@
-42,31
+43,37
@@
public final class RpcContextIdentifier implements Immutable{
public int hashCode() {
final int prime = 31;
int result = 1;
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) {
return result;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj)
{
return true;
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
return false;
+ }
RpcContextIdentifier other = (RpcContextIdentifier) obj;
if (routingContext == null) {
RpcContextIdentifier other = (RpcContextIdentifier) obj;
if (routingContext == null) {
- if (other.routingContext != null)
+ if (other.routingContext != null)
{
return false;
return false;
- } else if (!routingContext.equals(other.routingContext))
+ }
+ } else if (!routingContext.equals(other.routingContext)) {
return false;
return false;
+ }
if (rpcService == null) {
if (rpcService == null) {
- if (other.rpcService != null)
+ if (other.rpcService != null)
{
return false;
return false;
- } else if (!rpcService.equals(other.rpcService))
+ }
+ } else if (!rpcService.equals(other.rpcService)) {
return false;
return false;
+ }
return true;
}
return true;
}
-
}
}