Fix 'INPORT' keyword in port field
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / util / AddressNormalizationUtil.java
index b61e2b6cb69b1db333c58030f03323bcdf99853d..ee11155af092c2e97df42cfb0f4a4b3839ed9946 100644 (file)
@@ -50,8 +50,10 @@ public class AddressNormalizationUtil {
             return null;
         }
 
-        return OpenflowPortsUtil.getProtocolAgnosticPortUri(protocolVersion, InventoryDataServiceUtil
-                .portNumberfromNodeConnectorId(OpenflowVersion.get(protocolVersion), port.getValue()));
+        Long portValue = InventoryDataServiceUtil
+                .portNumberfromNodeConnectorId(OpenflowVersion.get(protocolVersion), port.getValue());
+
+        return portValue == null ? null : OpenflowPortsUtil.getProtocolAgnosticPortUri(protocolVersion, portValue);
     }
 
     /**