Fix RibImpl checkstyle 34/80834/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Mar 2019 11:16:13 +0000 (12:16 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Mar 2019 11:46:09 +0000 (12:46 +0100)
RIBImpl cannot really throw an exception, remove the declaration
and remove the corresponding catch block.

Change-Id: I54ebdcc33bf0c2163c646be36b79bb5658da6389
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/RIBImpl.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/config/RibImpl.java

index ff53d036980082243bb1c94604344ff726fb726a..014fa57835ff7f7f9d4c2e4ab87bbe463beb60f0 100755 (executable)
@@ -215,7 +215,7 @@ public final class RIBImpl extends BGPRibStateImpl implements RIB, TransactionCh
     }
 
     @Override
-    public synchronized void close() throws Exception {
+    public synchronized void close() {
         if (this.registration != null) {
             this.registration.close();
             this.registration = null;
index 2d0ededb2c1de6f12409e45157da5ed13c028b88..4baecc3ec7858c1cedd3f55d8e5bc48acdadc35d 100644 (file)
@@ -192,11 +192,7 @@ public final class RibImpl implements RIB, BGPRibStateConsumer, AutoCloseable {
     @Override
     public void close() {
         if (this.ribImpl != null) {
-            try {
-                this.ribImpl.close();
-            } catch (final Exception e) {
-                LOG.warn("Failed to close {} rib instance", this, e);
-            }
+            this.ribImpl.close();
             this.ribImpl = null;
         }
         if (this.schemaContextRegistration != null) {