Charles Chan
Committed by Gerrit Code Review

ONOS-3593 Fix NPE when selector or treatment is not assigned in FlowRule.Builder

Change-Id: I4dc1257ddcb67f43fadf16f56b517db84a74b83f
...@@ -301,8 +301,8 @@ public class DefaultFlowRule implements FlowRule { ...@@ -301,8 +301,8 @@ public class DefaultFlowRule implements FlowRule {
301 private Integer priority; 301 private Integer priority;
302 private DeviceId deviceId; 302 private DeviceId deviceId;
303 private Integer tableId = 0; 303 private Integer tableId = 0;
304 - private TrafficSelector selector; 304 + private TrafficSelector selector = DefaultTrafficSelector.builder().build();
305 - private TrafficTreatment treatment; 305 + private TrafficTreatment treatment = DefaultTrafficTreatment.builder().build();
306 private Integer timeout; 306 private Integer timeout;
307 private Boolean permanent; 307 private Boolean permanent;
308 308
......