Fixup comparison formatting 15/100015/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 9 Mar 2022 08:37:24 +0000 (09:37 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 9 Mar 2022 08:37:50 +0000 (09:37 +0100)
Make sure the '&&' is on a single line for readability.

Change-Id: I7c1f07e2c967c3c1bff1826afdde94a59a0c7cb9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java

index e5dca4a..e714fdd 100644 (file)
@@ -212,8 +212,8 @@ public abstract class AbstractRaftActorBehavior implements RaftActorBehavior {
             // the log with the later term is more up-to-date. If the logs
             // end with the same term, then whichever log is longer is
             // more up-to-date.
             // the log with the later term is more up-to-date. If the logs
             // end with the same term, then whichever log is longer is
             // more up-to-date.
-            if (requestVote.getLastLogTerm() > lastTerm() || requestVote.getLastLogTerm() == lastTerm()
-                    && requestVote.getLastLogIndex() >= lastIndex()) {
+            if (requestVote.getLastLogTerm() > lastTerm()
+                || requestVote.getLastLogTerm() == lastTerm() && requestVote.getLastLogIndex() >= lastIndex()) {
                 candidateLatest = true;
             }
 
                 candidateLatest = true;
             }