Bug 5179 : Fixing NPE in InterfaceManager 47/34347/3
authorFaseela K <faseela.k@ericsson.com>
Tue, 9 Feb 2016 13:57:46 +0000 (19:27 +0530)
committerFaseela K <faseela.k@ericsson.com>
Tue, 9 Feb 2016 17:23:27 +0000 (17:23 +0000)
Change-Id: I43a9792a1fa5066ad8116376c9b36a2be7854d57
Signed-off-by: Faseela K <faseela.k@ericsson.com>
(cherry picked from commit 6ea2beb7a1074c1cae20fac216bd14e2b3048cc2)

interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/IfmUtil.java

index 531f25b151549b51a9f5163bce9c16b60d6c8aba..76f78b2a5954fafe79e1b647185e426838958048 100644 (file)
@@ -198,7 +198,8 @@ public class IfmUtil {
         if(L2vlan.class.equals(ifType)){
             IfL2vlan vlanIface = interfaceInfo.getAugmentation(IfL2vlan.class);
             LOG.trace("L2Vlan: {}",vlanIface);
-            long vlanVid = (vlanIface == null) ? 0 : vlanIface.getVlanId().getValue();
+            long vlanVid = (vlanIface == null) ? 0 :
+                    vlanIface.getVlanId() == null ? 0 : vlanIface.getVlanId().getValue();
             if (vlanVid != 0) {
                 listActionInfo.add(new ActionInfo(ActionType.push_vlan, new String[] {}, actionKeyStart));
                 actionKeyStart++;