Remove unused exceptions
[controller.git] / opendaylight / md-sal / sal-akka-raft-example / src / main / java / org / opendaylight / controller / cluster / example / ExampleRoleChangeListener.java
index 0d11d7201d7cbd18efa2909128c5ea2b1d3482a9..d3bf544ef94d60365b1ae6cfb4046b5168110755 100644 (file)
@@ -57,7 +57,7 @@ public class ExampleRoleChangeListener extends AbstractUntypedActor implements A
     }
 
     @Override
-    protected void handleReceive(Object message) throws Exception {
+    protected void handleReceive(Object message) {
         if (message instanceof RegisterListener) {
             // called by the scheduler at intervals to register any unregistered notifiers
             sendRegistrationRequests();
@@ -88,13 +88,11 @@ public class ExampleRoleChangeListener extends AbstractUntypedActor implements A
     }
 
     private void populateRegistry(String memberName) {
-        for (String shard: SHARDS_TO_MONITOR) {
-            String notifier = new StringBuilder().append(NOTIFIER_AKKA_URL).append(memberName)
+        String notifier = new StringBuilder().append(NOTIFIER_AKKA_URL).append(memberName)
                 .append("/").append(memberName).append("-notifier").toString();
 
-            if (!notifierRegistrationStatus.containsKey(notifier)) {
-                notifierRegistrationStatus.put(notifier, false);
-            }
+        if (!notifierRegistrationStatus.containsKey(notifier)) {
+            notifierRegistrationStatus.put(notifier, false);
         }
 
         if (!registrationSchedule.isCancelled()) {
@@ -143,7 +141,7 @@ public class ExampleRoleChangeListener extends AbstractUntypedActor implements A
 
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         registrationSchedule.cancel();
     }
 }