commit | c615485959cc9a1dc46649e2272e9922c9daf19b | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Thu Jul 02 11:53:10 2015 -0700 |
committer | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Mon Jul 06 08:48:04 2015 -0700 |
tree | 704e342bae6bf28eb2819778c77ed13c5bd286e1 | |
parent | 3f1b128b17114ce081206191ea8472a16b13ddf9 [diff] |
Fix suspicious behavior Union of allocated resources and available reousrces doesn't seem to be the result as available resources Change-Id: I3c8f0b3293f81b329aa06de16635adc006730598
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java b/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java index e48b2cb..9da155c 100644 --- a/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java +++ b/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java
@@ -287,7 +287,7 @@ Set<ResourceAllocation> allocatedRes = allocations.getResourceAllocation(link); Set<ResourceRequest> result = Sets.newHashSet(getAvailableResources(link)); - result.addAll(allocatedRes); + result.removeAll(allocatedRes); return result; }