Fix Akka exception: cannot use non-static local Creator to create actors
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / notifications / RoleChangeNotifier.java
index a9aa56174d84a4309c27560dbd1be26c4603de34..d065f6d211be3ecba0bfc1364eb0693e68e42679 100644 (file)
@@ -8,11 +8,9 @@
 
 package org.opendaylight.controller.cluster.notifications;
 
-import akka.actor.Actor;
 import akka.actor.ActorPath;
 import akka.actor.ActorRef;
 import akka.actor.Props;
-import akka.japi.Creator;
 import akka.serialization.Serialization;
 import com.google.common.collect.Maps;
 import java.util.Map;
@@ -35,12 +33,7 @@ public class RoleChangeNotifier extends AbstractUntypedActor implements AutoClos
     }
 
     public static Props getProps(final String memberId) {
-        return Props.create(new Creator<Actor>() {
-            @Override
-            public Actor create() throws Exception {
-                return new RoleChangeNotifier(memberId);
-            }
-        });
+        return Props.create(RoleChangeNotifier.class, memberId);
     }
 
     @Override