Annotate AbstractRaftRPC with java.io.Serial
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / RequestVote.java
index 72d1496951ef79aed8d7fba07fb963a8813793cd..2ac4d7e355481da2cfa5a1b37d6b1015363191a7 100644 (file)
@@ -16,6 +16,7 @@ import java.io.ObjectOutput;
  * Invoked by candidates to gather votes (ยง5.2).
  */
 public final class RequestVote extends AbstractRaftRPC {
+    @java.io.Serial
     private static final long serialVersionUID = -6967509186297108657L;
 
     // candidate requesting vote
@@ -73,16 +74,9 @@ public final class RequestVote extends AbstractRaftRPC {
         public Proxy() {
         }
 
-        Proxy(final RequestVote requestVote) {
-            this.requestVote = requestVote;
-        }
-
         @Override
-        public void writeExternal(final ObjectOutput out) throws IOException {
-            out.writeLong(requestVote.getTerm());
-            out.writeObject(requestVote.candidateId);
-            out.writeLong(requestVote.lastLogIndex);
-            out.writeLong(requestVote.lastLogTerm);
+        public void writeExternal(final ObjectOutput out) {
+            throw new UnsupportedOperationException();
         }
 
         @Override