Fix warnings/javadocs in sal-distributed-datastore
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DataTreeChangeListenerActor.java
index 3f1190911789b1f6133054b985ba5035ba77ddd4..b3e0fb6d6f5d7a11c1afd8ae181a6221ea4c568a 100644 (file)
@@ -15,15 +15,12 @@ import org.opendaylight.controller.cluster.datastore.messages.DataTreeChanged;
 import org.opendaylight.controller.cluster.datastore.messages.DataTreeChangedReply;
 import org.opendaylight.controller.cluster.datastore.messages.EnableNotification;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataTreeChangeListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Proxy actor which acts as a facade to the user-provided listener. Responsible for decapsulating
  * DataTreeChanged messages and dispatching their context to the user.
  */
 final class DataTreeChangeListenerActor extends AbstractUntypedActor {
-    private static final Logger LOG = LoggerFactory.getLogger(DataTreeChangeListenerActor.class);
     private final DOMDataTreeChangeListener listener;
     private boolean notificationsEnabled = false;
 
@@ -37,9 +34,12 @@ final class DataTreeChangeListenerActor extends AbstractUntypedActor {
             dataChanged((DataTreeChanged)message);
         } else if (message instanceof EnableNotification) {
             enableNotification((EnableNotification) message);
+        } else {
+            unknownMessage(message);
         }
     }
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     private void dataChanged(final DataTreeChanged message) {
         // Do nothing if notifications are not enabled
         if (!notificationsEnabled) {
@@ -65,7 +65,7 @@ final class DataTreeChangeListenerActor extends AbstractUntypedActor {
 
     private void enableNotification(final EnableNotification message) {
         notificationsEnabled = message.isEnabled();
-        LOG.debug("{} notifications for listener {}", (notificationsEnabled ? "Enabled" : "Disabled"),
+        LOG.debug("{} notifications for listener {}", notificationsEnabled ? "Enabled" : "Disabled",
                 listener);
     }