Charles Chan
Committed by Gerrit Code Review

Fix NPE in FlowEntryBuilder

Change-Id: I1675ff7d6604ce289532f6f6e8bf9ebc40935512
...@@ -441,11 +441,13 @@ public class FlowEntryBuilder { ...@@ -441,11 +441,13 @@ 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 - try { 444 + if (treatmentInterpreter != null) {
445 - builder.extension(treatmentInterpreter.mapAction(action), deviceId); 445 + try {
446 - break; 446 + builder.extension(treatmentInterpreter.mapAction(action), deviceId);
447 - } catch (UnsupportedOperationException e) { 447 + break;
448 - log.debug("Unsupported action extension; defaulting to native OF"); 448 + } catch (UnsupportedOperationException e) {
449 + log.debug("Unsupported action extension; defaulting to native OF");
450 + }
449 } 451 }
450 @SuppressWarnings("unchecked") 452 @SuppressWarnings("unchecked")
451 OFOxm<OFVlanVidMatch> vlanvid = (OFOxm<OFVlanVidMatch>) oxm; 453 OFOxm<OFVlanVidMatch> vlanvid = (OFOxm<OFVlanVidMatch>) oxm;
......