Adapt TransportPCE code to Sulfur
[transportpce.git] / servicehandler / src / main / java / org / opendaylight / transportpce / servicehandler / listeners / RendererListenerImpl.java
index 44888267629e6ddef5c2e9a5c68540b3e3e499fe..a30c7d2378cffc7656ea27af9c952b044cbecdea 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.transportpce.servicehandler.listeners;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 package org.opendaylight.transportpce.servicehandler.listeners;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
 import java.util.List;
 import java.util.Map;
 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
@@ -301,11 +302,13 @@ public class RendererListenerImpl implements TransportpceRendererListener {
 
     private void updateOtnTopology(RendererRpcResultSp notification, boolean isDeletion) {
         Link link = notification.getLink();
 
     private void updateOtnTopology(RendererRpcResultSp notification, boolean isDeletion) {
         Link link = notification.getLink();
-        List<String> supportedLinkIds = notification.getLinkId();
-        if (link == null && supportedLinkIds == null) {
+        if (link == null && notification.getLinkId() == null) {
             return;
         }
             return;
         }
-
+        List<String> supportedLinkIds = null;
+        if (notification.getLinkId() != null) {
+            supportedLinkIds = new ArrayList<>(notification.getLinkId());
+        }
         String serviceType = notification.getServiceType();
         switch (serviceType) {
             case StringConstants.SERVICE_TYPE_OTU4:
         String serviceType = notification.getServiceType();
         switch (serviceType) {
             case StringConstants.SERVICE_TYPE_OTU4: