Merge "Add generic arguments"
authorMoiz Raja <moraja@cisco.com>
Fri, 10 Apr 2015 16:08:56 +0000 (16:08 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 10 Apr 2015 16:08:57 +0000 (16:08 +0000)
1  2 
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java

@@@ -37,9 -34,9 +37,9 @@@ import org.opendaylight.controller.clus
  /**
   * A sample actor showing how the RaftActor is to be extended
   */
 -public class ExampleActor extends RaftActor {
 +public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort, RaftActorSnapshotCohort {
  
-     private final Map<String, String> state = new HashMap();
+     private final Map<String, String> state = new HashMap<>();
  
      private long persistIdentifier = 1;
      private final Optional<ActorRef> roleChangeNotifier;
          getSelf().tell(new CaptureSnapshotReply(bs.toByteArray()), null);
      }
  
 -    @Override protected void applySnapshot(byte [] snapshot) {
 +    @Override
 +    public void applySnapshot(byte [] snapshot) {
          state.clear();
          try {
-             state.putAll((HashMap) toObject(snapshot));
+             state.putAll((HashMap<String, String>) toObject(snapshot));
          } catch (Exception e) {
             LOG.error("Exception in applying snapshot", e);
          }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.