commit | 326162fd4c3386170c8c947ce8393417e58738bd | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Wed Jun 08 18:32:51 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Jun 16 09:16:32 2016 +0000 |
tree | de9358a48d147f7f5e9a92de78430d938def61c6 | |
parent | dd89bbda2abcd32fc8b4c6d7af15a0af5002660a [diff] |
Avoid extracting resource set from backing range set This is one of fixes for ONOS-4684 Change-Id: I6170d466f168f0b2299f96c623e5435c6631ba12
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java index 9918a28..fdfaf7c 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java +++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/EncodableDiscreteResources.java
@@ -104,7 +104,9 @@ @Override public boolean containsAny(Set<DiscreteResource> other) { - return !Sets.intersection(this.values(), other).isEmpty(); + return other.stream() + .filter(x -> !map.containsKey(x)) + .anyMatch(x -> map.get(getClass(x)).contains(x)); } @Override