From 73ab61a037dd2489600acbc1eaf6f9ee549c204a Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 9 Mar 2022 09:37:24 +0100 Subject: [PATCH 1/1] Fixup comparison formatting Make sure the '&&' is on a single line for readability. Change-Id: I7c1f07e2c967c3c1bff1826afdde94a59a0c7cb9 Signed-off-by: Robert Varga --- .../cluster/raft/behaviors/AbstractRaftActorBehavior.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java index e5dca4a6d8..e714fddb74 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java @@ -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. - if (requestVote.getLastLogTerm() > lastTerm() || requestVote.getLastLogTerm() == lastTerm() - && requestVote.getLastLogIndex() >= lastIndex()) { + if (requestVote.getLastLogTerm() > lastTerm() + || requestVote.getLastLogTerm() == lastTerm() && requestVote.getLastLogIndex() >= lastIndex()) { candidateLatest = true; } -- 2.36.6