commit | f25a5115e901f1f3383ccb60af7ad48355c39ee2 | [log] [tgz] |
---|---|---|
author | Brian O'Connor <bocon@onlab.us> | Mon Dec 08 01:28:50 2014 -0800 |
committer | Brian O'Connor <bocon@onlab.us> | Mon Dec 08 23:20:42 2014 +0000 |
tree | 6ff8d07bfd34f044f933214cb8c036ebbfe4a390 | |
parent | e84ab32f84aea4a0604e8b15fd22e75f85aaa85b [diff] |
temporary NPE fix for ONOS-439 Change-Id: I238ea24e1a4c4bebb40d132d060c418f5675f570
diff --git a/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java b/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java index 3e7ae17..200126b 100644 --- a/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java +++ b/apps/optical/src/main/java/org/onosproject/optical/OpticalLinkProvider.java
@@ -137,8 +137,14 @@ Port srcPort = deviceService.getPort(srcId, link.src().port()); Port dstPort = deviceService.getPort(dstId, link.dst().port()); + if (srcPort == null || dstPort == null) { + return; //FIXME remove this in favor of below TODO + } + boolean active = deviceService.isAvailable(srcId) && deviceService.isAvailable(dstId) && + // TODO: should update be queued if src or dstPort is null? + //srcPort != null && dstPort != null && srcPort.isEnabled() && dstPort.isEnabled(); LinkDescription desc = new DefaultLinkDescription(link.src(), link.dst(), OPTICAL);
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/OpticalPathIntentInstaller.java b/core/net/src/main/java/org/onosproject/net/intent/impl/OpticalPathIntentInstaller.java index e37140d..1e2b97c 100644 --- a/core/net/src/main/java/org/onosproject/net/intent/impl/OpticalPathIntentInstaller.java +++ b/core/net/src/main/java/org/onosproject/net/intent/impl/OpticalPathIntentInstaller.java
@@ -133,6 +133,7 @@ List<FlowRuleBatchEntry> rules = Lists.newLinkedList(); ConnectPoint prev = intent.src(); + //FIXME check for null allocations //TODO throw exception if the lambda was not assigned successfully for (Link link : intent.path().links()) { Lambda la = null;