Make RequestVoteReply final
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / RequestVoteReply.java
index 865d4c287bd7b63cd051ef46b8db2b959f69d4b1..ea56aeca568784dca1e72d6f7295126bd711fdd1 100644 (file)
@@ -8,10 +8,10 @@
 
 package org.opendaylight.controller.cluster.raft.messages;
 
-public class RequestVoteReply extends AbstractRaftRPC {
+public final class RequestVoteReply extends AbstractRaftRPC {
     private static final long serialVersionUID = 8427899326488775660L;
 
-    // true means candidate received vot
+    // true means candidate received vote
     private final boolean voteGranted;
 
     public RequestVoteReply(long term, boolean voteGranted) {
@@ -19,11 +19,6 @@ public class RequestVoteReply extends AbstractRaftRPC {
         this.voteGranted = voteGranted;
     }
 
-    @Override
-    public long getTerm() {
-        return term;
-    }
-
     public boolean isVoteGranted() {
         return voteGranted;
     }
@@ -31,7 +26,7 @@ public class RequestVoteReply extends AbstractRaftRPC {
     @Override
     public String toString() {
         StringBuilder builder = new StringBuilder();
-        builder.append("RequestVoteReply [term=").append(term).append(", voteGranted=").append(voteGranted).append("]");
+        builder.append("RequestVoteReply [term=").append(getTerm()).append(", voteGranted=").append(voteGranted).append("]");
         return builder.toString();
     }
 }