commit | 4211baa138550c3cd64e30896b92d0f74bb6f868 | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Wed Apr 20 17:10:40 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Apr 21 04:12:54 2016 +0000 |
tree | b3348e38dc6249e778bd4555108e278e97de0d23 | |
parent | b2111341376bd6d285192bf4d312ad21b6b50388 [diff] |
Fix NPE in FlowEntryBuilder Change-Id: I1675ff7d6604ce289532f6f6e8bf9ebc40935512
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java index 16ad6d8..c697967 100644 --- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java +++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
@@ -441,11 +441,13 @@ builder.setVlanPcp(vlanpcp.getValue().getValue()); break; case VLAN_VID: - try { - builder.extension(treatmentInterpreter.mapAction(action), deviceId); - break; - } catch (UnsupportedOperationException e) { - log.debug("Unsupported action extension; defaulting to native OF"); + if (treatmentInterpreter != null) { + try { + builder.extension(treatmentInterpreter.mapAction(action), deviceId); + break; + } catch (UnsupportedOperationException e) { + log.debug("Unsupported action extension; defaulting to native OF"); + } } @SuppressWarnings("unchecked") OFOxm<OFVlanVidMatch> vlanvid = (OFOxm<OFVlanVidMatch>) oxm;