commit | 8b60903155f6c484644295cb0c2a6ae62bbb2666 | [log] [tgz] |
---|---|---|
author | Andrea Campanella <andrea@opennetwokring.org> | Tue Jan 30 16:19:35 2018 +0100 |
committer | Andrea Campanella <andrea@opennetwokring.org> | Tue Jan 30 16:19:35 2018 +0100 |
tree | a4577f4e11a8823a5767f72eb7e119c8ed7e5477 | |
parent | 0a271db69ff582eca0c3b120721e251b5827a970 [diff] |
T3 - Fixing NPE for flow rules Change-Id: I691236b016d41bf105a61219032d1898a01c7591
diff --git a/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java b/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java index cfc6371..e56035d 100644 --- a/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java +++ b/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java
@@ -16,6 +16,7 @@ package org.onosproject.t3.api; +import com.google.common.collect.ImmutableList; import org.onosproject.net.ConnectPoint; import org.onosproject.net.DeviceId; import org.onosproject.net.flow.FlowEntry; @@ -151,7 +152,7 @@ * @return the flows matched */ public List<FlowEntry> getFlowsForDevice(DeviceId deviceId) { - return flowsForDevice.get(deviceId); + return flowsForDevice.getOrDefault(deviceId, ImmutableList.of()); } @Override