Fix inventory listeners code style
[transportpce.git] / inventory / src / main / java / org / opendaylight / transportpce / inventory / listener / DeviceConfigListener.java
index ad1c73b308bfb2ba1d2aa016d36d25cc363d1ba3..837f225dd31414509100fff6bf926f953d98c32f 100644 (file)
@@ -59,7 +59,7 @@ public class DeviceConfigListener implements DataTreeChangeListener<Node> {
             long count = netconfNode.getAvailableCapabilities().getAvailableCapability().stream()
                     .filter(cp -> cp.getCapability().contains(StringConstants.OPENROADM_DEVICE_MODEL_NAME))
                     .count();
-            LOG.debug("DCL Modification Type {}", device.getRootNode().modificationType().toString());
+            LOG.debug("DCL Modification Type {}", device.getRootNode().modificationType());
             LOG.debug("DCL Capability Count {}", count);
             LOG.debug("DCL Connection Status {}", connectionStatus);
             if (isCreate(device) || isUpdate(device)) {
@@ -111,16 +111,16 @@ public class DeviceConfigListener implements DataTreeChangeListener<Node> {
      */
     private static List<DataTreeModification<Node>> getRealDevicesOnly(Collection<DataTreeModification<Node>> changes) {
         return changes.stream()
-                .filter(change -> (change.getRootNode().dataAfter() != null
+                .filter(change ->
+                    (change.getRootNode().dataAfter() != null
                         && !StringConstants.DEFAULT_NETCONF_NODEID
-                        .equalsIgnoreCase(change.getRootNode().dataAfter().key().getNodeId().getValue())
+                            .equalsIgnoreCase(change.getRootNode().dataAfter().key().getNodeId().getValue())
                         && change.getRootNode().dataAfter().augmentation(NetconfNode.class) != null)
-                        || (change.getRootNode().dataBefore() != null
-                        && !StringConstants.DEFAULT_NETCONF_NODEID.equalsIgnoreCase(
-                        change.getRootNode().dataBefore().key().getNodeId().getValue())
-                        && change.getRootNode().dataBefore().augmentation(NetconfNode.class) != null
-
-                )).collect(Collectors.toList());
+                    || (change.getRootNode().dataBefore() != null
+                        && !StringConstants.DEFAULT_NETCONF_NODEID
+                            .equalsIgnoreCase(change.getRootNode().dataBefore().key().getNodeId().getValue())
+                        && change.getRootNode().dataBefore().augmentation(NetconfNode.class) != null))
+                .collect(Collectors.toList());
     }
 
     /**