X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbehaviors%2FFollowerIdentifier.java;h=d961f84b0c73b1805427fd692798dd5f56afdeb1;hb=8874f15140aa20aa205b5469e02f319076d53860;hp=32c6da4b527431d9e874000e6dd0acaff696a9d5;hpb=9a091425d16dadf09a5be4e764785707f5253013;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerIdentifier.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerIdentifier.java index 32c6da4b52..d961f84b0c 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerIdentifier.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerIdentifier.java @@ -19,17 +19,21 @@ import org.opendaylight.yangtools.util.AbstractStringIdentifier; * @author Thomas Pantelis */ class FollowerIdentifier extends AbstractStringIdentifier { + @java.io.Serial private static final long serialVersionUID = 1L; - FollowerIdentifier(String followerId) { + FollowerIdentifier(final String followerId) { super(followerId); } + @java.io.Serial private Object writeReplace() { - return new Proxy(this); + return new FI(getValue()); } + @Deprecated(since = "7.0.0", forRemoval = true) private static class Proxy implements Externalizable { + @java.io.Serial private static final long serialVersionUID = 1L; private FollowerIdentifier identifier; @@ -40,20 +44,21 @@ class FollowerIdentifier extends AbstractStringIdentifier { public Proxy() { } - Proxy(FollowerIdentifier identifier) { + Proxy(final FollowerIdentifier identifier) { this.identifier = identifier; } @Override - public void writeExternal(ObjectOutput out) throws IOException { + public void writeExternal(final ObjectOutput out) throws IOException { out.writeObject(identifier.getValue()); } @Override - public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { + public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { identifier = new FollowerIdentifier((String) in.readObject()); } + @java.io.Serial private Object readResolve() { return identifier; }