X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcds-access-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2Fconcepts%2FClientIdentifier.java;h=fe178f26e9d25cc0aa29202ce951b5096fd6a3c1;hb=refs%2Fchanges%2F59%2F47459%2F4;hp=0a2ea5702c268caaf58581384137d5677895fb4c;hpb=a06a30a33507689464c736cb37c26445f232280e;p=controller.git diff --git a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/ClientIdentifier.java b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/ClientIdentifier.java index 0a2ea5702c..fe178f26e9 100644 --- a/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/ClientIdentifier.java +++ b/opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/ClientIdentifier.java @@ -16,7 +16,8 @@ import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; -import org.opendaylight.yangtools.concepts.Identifier; +import org.opendaylight.yangtools.concepts.WritableIdentifier; +import org.opendaylight.yangtools.concepts.WritableObjects; /** * A cluster-wide unique identifier of a frontend instance. This identifier discerns between individual incarnations @@ -25,12 +26,15 @@ import org.opendaylight.yangtools.concepts.Identifier; * @author Robert Varga */ @Beta -public final class ClientIdentifier implements Identifier, WritableObject { +public final class ClientIdentifier implements WritableIdentifier { private static final class Proxy implements Externalizable { private static final long serialVersionUID = 1L; private FrontendIdentifier frontendId; private long generation; + // checkstyle flags the public modifier as redundant however it is explicitly needed for Java serialization to + // be able to create instances via reflection. + @SuppressWarnings("checkstyle:RedundantModifier") public Proxy() { // Needed for Externalizable } @@ -96,15 +100,15 @@ public final class ClientIdentifier implements Identifier, WritableObject { } @Override - public boolean equals(final Object o) { - if (this == o) { + public boolean equals(final Object obj) { + if (this == obj) { return true; } - if (!(o instanceof ClientIdentifier)) { + if (!(obj instanceof ClientIdentifier)) { return false; } - final ClientIdentifier other = (ClientIdentifier) o; + final ClientIdentifier other = (ClientIdentifier) obj; return generation == other.generation && frontendId.equals(other.frontendId); }