Use inline initialization of Stopwatch
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / behaviors / Leader.java
index a4ce0da482dbfc16e3d34c97b536f6c1ce02efc8..6d55316586cf85c725bb8e39953ee64b4f08217c 100644 (file)
@@ -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