X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2Fapi%2FRpcRoutingContext.java;h=a847d326a32aeb999b509c17db286856c0c2dfcc;hp=66d290f531aa41f5346d970c92bba1963094f28f;hb=f71972480694687d1efe5536015fe62a2e064914;hpb=f3ba8a814797fb5d50e24e3f9144f01406121464 diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcRoutingContext.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcRoutingContext.java index 66d290f531..a847d326a3 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcRoutingContext.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcRoutingContext.java @@ -8,15 +8,10 @@ package org.opendaylight.controller.sal.core.api; import java.io.Serializable; - import org.opendaylight.yangtools.concepts.Immutable; import org.opendaylight.yangtools.yang.common.QName; -public class RpcRoutingContext implements Immutable, Serializable { - - /** - * - */ +public final class RpcRoutingContext implements Immutable, Serializable { private static final long serialVersionUID = -9079324728075883325L; private final QName context; @@ -24,12 +19,11 @@ public class RpcRoutingContext implements Immutable, Serializable { private RpcRoutingContext(QName context, QName rpc) { - super(); this.context = context; this.rpc = rpc; } - public static final RpcRoutingContext create(QName context, QName rpc) { + public static RpcRoutingContext create(QName context, QName rpc) { return new RpcRoutingContext(context, rpc); } @@ -50,30 +44,37 @@ public class RpcRoutingContext implements Immutable, Serializable { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((context == null) ? 0 : context.hashCode()); - result = prime * result + ((rpc == null) ? 0 : rpc.hashCode()); + result = prime * result + (context == null ? 0 : context.hashCode()); + result = prime * result + (rpc == null ? 0 : rpc.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; + } RpcRoutingContext other = (RpcRoutingContext) obj; if (context == null) { - if (other.context != null) + if (other.context != null) { return false; - } else if (!context.equals(other.context)) + } + } else if (!context.equals(other.context)) { return false; + } if (rpc == null) { - if (other.rpc != null) + if (other.rpc != null) { return false; - } else if (!rpc.equals(other.rpc)) + } + } else if (!rpc.equals(other.rpc)) { return false; + } return true; } }