commit | 0e711b589347499678a98d0b6b184d8acdaa9fca | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Mon Sep 11 15:21:57 2017 -0700 |
committer | Charles Chan <charles@opennetworking.org> | Tue Sep 12 21:29:18 2017 +0000 |
tree | 0a2290713d1dc4849ea2567369216306a361869a | |
parent | 57e918236c554b86dd887ddbf08188992f7866ac [diff] |
Fix NoSuchElementException Change-Id: I2c80400d10dffd7dfda777de5279135ae687af35
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java index 0d263e7..709d05e 100644 --- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java +++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -244,6 +244,11 @@ */ // XXX refactor protected void populateSubnet(Set<ConnectPoint> cpts, Set<IpPrefix> subnets) { + if (cpts == null || cpts.size() < 1 || cpts.size() > 2) { + log.warn("Skipping populateSubnet due to illegal size of connect points. {}", cpts); + return; + } + lastRoutingChange = DateTime.now(); statusLock.lock(); try {