Fix FindBugs warnings in sal-distributed-datastore and enable enforcement
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / shardmanager / ShardManager.java
index 7653aea3fb814b2c69e36684800902df013aab72..bbf5cf31003d9079761e57c3c6db648761ad3070 100644 (file)
@@ -34,6 +34,7 @@ import akka.util.Timeout;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import java.io.ByteArrayInputStream;
+import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -160,7 +161,7 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering {
         this.type = datastoreContextFactory.getBaseDatastoreContext().getDataStoreName();
         this.shardDispatcherPath =
                 new Dispatchers(context().system().dispatchers()).getDispatcherPath(Dispatchers.DispatcherType.Shard);
-        this.waitTillReadyCountdownLatch = builder.getWaitTillReadyCountdownLatch();
+        this.waitTillReadyCountdownLatch = builder.getWaitTillReadyCountDownLatch();
         this.primaryShardInfoCache = builder.getPrimaryShardInfoCache();
         this.restoreFromSnapshot = builder.getRestoreFromSnapshot();
 
@@ -655,7 +656,7 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering {
                 LOG.debug("{}: Deserialized restored ShardManagerSnapshot: {}", persistenceId(), snapshot);
 
                 applyShardManagerSnapshot(snapshot);
-            } catch (Exception e) {
+            } catch (ClassNotFoundException | IOException e) {
                 LOG.error("{}: Error deserializing restored ShardManagerSnapshot", persistenceId(), e);
             }
         }