From: Robert Varga Date: Wed, 30 Mar 2016 08:55:53 +0000 (+0200) Subject: Use inline initialization of Stopwatch X-Git-Tag: release/boron~273 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=bd4d8d7de8c075062ccb517f0a2eefe02617bdd7 Use inline initialization of Stopwatch No need to have it the constructor, just inline the initialization. Change-Id: Ife07c58baee22a503b1b4b4bbcd4c8fa8bb317dd Signed-off-by: Robert Varga --- diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java index a4ce0da482..6d55316586 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java @@ -52,12 +52,11 @@ public class Leader extends AbstractLeader { @VisibleForTesting static final Object ISOLATED_LEADER_CHECK = new Object(); - private final Stopwatch isolatedLeaderCheck; + private final Stopwatch isolatedLeaderCheck = Stopwatch.createStarted(); private @Nullable LeadershipTransferContext leadershipTransferContext; public Leader(RaftActorContext context) { super(context, RaftState.Leader); - isolatedLeaderCheck = Stopwatch.createStarted(); } @Override