X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fexample%2FExampleActor.java;h=bafa116b55eb03e23fcc87279bcc245792b24787;hb=d10d762c451fb812e76d517720402b6ad6da3609;hp=ed19f21dedb8d5900a0df35aa31fc20ce6b8aee4;hpb=bcc66b3ee07a3bc18176418c4cd211596f49f2f0;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java index ed19f21ded..bafa116b55 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java @@ -36,7 +36,7 @@ import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payloa */ public class ExampleActor extends RaftActor { - private final Map state = new HashMap(); + private final Map state = new HashMap<>(); private long persistIdentifier = 1; private final Optional roleChangeNotifier; @@ -131,12 +131,12 @@ public class ExampleActor extends RaftActor { @Override protected void applySnapshot(byte [] snapshot) { state.clear(); try { - state.putAll((HashMap) toObject(snapshot)); + state.putAll((HashMap) toObject(snapshot)); } catch (Exception e) { LOG.error("Exception in applying snapshot", e); } if(LOG.isDebugEnabled()) { - LOG.debug("Snapshot applied to state : {}", ((HashMap) state).size()); + LOG.debug("Snapshot applied to state : {}", ((HashMap) state).size()); } }