Charles Chan
Committed by Gerrit Code Review

Fix NPE in FlowEntryBuilder

Change-Id: I1675ff7d6604ce289532f6f6e8bf9ebc40935512
...@@ -441,12 +441,14 @@ public class FlowEntryBuilder { ...@@ -441,12 +441,14 @@ public class FlowEntryBuilder {
441 builder.setVlanPcp(vlanpcp.getValue().getValue()); 441 builder.setVlanPcp(vlanpcp.getValue().getValue());
442 break; 442 break;
443 case VLAN_VID: 443 case VLAN_VID:
444 + if (treatmentInterpreter != null) {
444 try { 445 try {
445 builder.extension(treatmentInterpreter.mapAction(action), deviceId); 446 builder.extension(treatmentInterpreter.mapAction(action), deviceId);
446 break; 447 break;
447 } catch (UnsupportedOperationException e) { 448 } catch (UnsupportedOperationException e) {
448 log.debug("Unsupported action extension; defaulting to native OF"); 449 log.debug("Unsupported action extension; defaulting to native OF");
449 } 450 }
451 + }
450 @SuppressWarnings("unchecked") 452 @SuppressWarnings("unchecked")
451 OFOxm<OFVlanVidMatch> vlanvid = (OFOxm<OFVlanVidMatch>) oxm; 453 OFOxm<OFVlanVidMatch> vlanvid = (OFOxm<OFVlanVidMatch>) oxm;
452 builder.setVlanId(VlanId.vlanId(vlanvid.getValue().getVlan())); 454 builder.setVlanId(VlanId.vlanId(vlanvid.getValue().getVlan()));
......