alshabib
Committed by Gerrit Code Review

Only process pending objectives if there are any.

Change-Id: Ibb34dce32e0bfc55b317036130ead2c1babbaeac
...@@ -218,7 +218,8 @@ public class FlowObjectiveManager implements FlowObjectiveService { ...@@ -218,7 +218,8 @@ public class FlowObjectiveManager implements FlowObjectiveService {
218 } 218 }
219 219
220 private void processPendingObjectives(DeviceId deviceId) { 220 private void processPendingObjectives(DeviceId deviceId) {
221 - pendingObjectives.get(deviceId).forEach(obj -> { 221 + pendingObjectives.getOrDefault(deviceId,
222 + Collections.emptySet()).forEach(obj -> {
222 if (obj instanceof NextObjective) { 223 if (obj instanceof NextObjective) {
223 getDevicePipeliner(deviceId) 224 getDevicePipeliner(deviceId)
224 .next(Collections.singletonList((NextObjective) obj)); 225 .next(Collections.singletonList((NextObjective) obj));
......