Remove unused exceptions
authorStephen Kitt <skitt@redhat.com>
Mon, 23 Jul 2018 14:45:38 +0000 (16:45 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 25 Jul 2018 11:17:13 +0000 (11:17 +0000)
This drops exception declarations which are never used.

Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedActor.java
java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedPersistentActor.java
java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePruner.java
java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifier.java

index d40ec55b94ac96caa4dcd0a7f01de091e3685f74..6bd7a053b0bcc9480cd7ff42d3f67379a06ef805 100644 (file)
@@ -31,7 +31,7 @@ public abstract class AbstractUntypedActor extends UntypedActor implements Execu
     }
 
     @Override
-    public final void onReceive(final Object message) throws Exception {
+    public final void onReceive(final Object message) {
         if (message instanceof ExecuteInSelfMessage) {
             ((ExecuteInSelfMessage) message).run();
         } else {
@@ -44,9 +44,8 @@ public abstract class AbstractUntypedActor extends UntypedActor implements Execu
      * it should call {@link #ignoreMessage(Object)} or {@link #unknownMessage(Object)}.
      *
      * @param message the incoming message
-     * @throws Exception on message failure
      */
-    protected abstract void handleReceive(Object message) throws Exception;
+    protected abstract void handleReceive(Object message);
 
     protected final void ignoreMessage(final Object message) {
         LOG.debug("Ignoring unhandled message {}", message);
index 7058e77d87b235da2de3dc77f913fb4a486121fa..e9aaa65453c4b14fc40de1451a668a3091699fa9 100644 (file)
@@ -63,7 +63,7 @@ public abstract class AbstractUntypedPersistentActor extends UntypedPersistentAc
         LOG.debug("Unhandled message {} ", message);
     }
 
-    protected void unknownMessage(final Object message) throws Exception {
+    protected void unknownMessage(final Object message) {
         LOG.debug("Received unhandled message {}", message);
         unhandled(message);
     }
index 5363661c0e69518027647ef5c905188ff0d6735c..be31081e935927e0ed7e8f5639061c14cdc74be1 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.controller.cluster.datastore.node.utils.transformer;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
-import java.io.IOException;
 import java.net.URI;
 import java.util.LinkedList;
 import java.util.List;
@@ -51,7 +50,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
     @SuppressWarnings("unchecked")
     @Override
     public void leafNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, Object value)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
 
         checkNotSealed();
 
@@ -73,7 +72,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startLeafSet(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.leafSetBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -81,7 +80,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startOrderedLeafSet(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int str)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.orderedLeafSetBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -89,7 +88,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @SuppressWarnings({ "unchecked" })
     @Override
-    public void leafSetEntryNode(QName name, Object value) throws IOException, IllegalArgumentException {
+    public void leafSetEntryNode(QName name, Object value) throws IllegalArgumentException {
         checkNotSealed();
 
         NormalizedNodeBuilderWrapper parent = stack.peek();
@@ -113,7 +112,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startContainerNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.containerBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -121,13 +120,13 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startYangModeledAnyXmlNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         throw new UnsupportedOperationException("Not implemented yet");
     }
 
     @Override
     public void startUnkeyedList(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.unkeyedListBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -135,7 +134,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startUnkeyedListItem(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalStateException {
+            throws IllegalStateException {
         checkNotSealed();
 
         addBuilder(Builders.unkeyedListEntryBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -143,7 +142,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startMapNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.mapBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -151,7 +150,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startMapEntryNode(YangInstanceIdentifier.NodeIdentifierWithPredicates nodeIdentifierWithPredicates,
-            int count)  throws IOException, IllegalArgumentException {
+            int count)  throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.mapEntryBuilder().withNodeIdentifier(nodeIdentifierWithPredicates),
@@ -160,7 +159,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startOrderedMapNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.orderedMapBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -168,7 +167,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startChoiceNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, int count)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         addBuilder(Builders.choiceBuilder().withNodeIdentifier(nodeIdentifier), nodeIdentifier);
@@ -176,7 +175,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @Override
     public void startAugmentationNode(YangInstanceIdentifier.AugmentationIdentifier augmentationIdentifier)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
 
         checkNotSealed();
 
@@ -186,7 +185,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
     @SuppressWarnings("unchecked")
     @Override
     public void anyxmlNode(YangInstanceIdentifier.NodeIdentifier nodeIdentifier, Object value)
-            throws IOException, IllegalArgumentException {
+            throws IllegalArgumentException {
         checkNotSealed();
 
         NormalizedNodeBuilderWrapper parent = stack.peek();
@@ -208,7 +207,7 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
 
     @SuppressWarnings("unchecked")
     @Override
-    public void endNode() throws IOException, IllegalStateException {
+    public void endNode() throws IllegalStateException {
         checkNotSealed();
 
         NormalizedNodeBuilderWrapper child = stack.pop();
@@ -232,12 +231,12 @@ public class NormalizedNodePruner implements NormalizedNodeStreamWriter {
     }
 
     @Override
-    public void close() throws IOException {
+    public void close() {
         sealed = true;
     }
 
     @Override
-    public void flush() throws IOException {
+    public void flush() {
 
     }
 
index 95f1372a054bcc603ac73263fad299ab85798e7b..89f9dd12e050aab2e99da50cf1e945a2fccf4ab5 100644 (file)
@@ -99,7 +99,7 @@ public class RoleChangeNotifier extends AbstractUntypedActor implements AutoClos
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         registeredListeners.clear();
     }
 }