Committed by
Gerrit Code Review
Avoid extracting resource set from backing range set
This is one of fixes for ONOS-4684 Change-Id: I6170d466f168f0b2299f96c623e5435c6631ba12
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -104,7 +104,9 @@ final class EncodableDiscreteResources implements DiscreteResources { | ... | @@ -104,7 +104,9 @@ final class EncodableDiscreteResources implements DiscreteResources { |
104 | 104 | ||
105 | @Override | 105 | @Override |
106 | public boolean containsAny(Set<DiscreteResource> other) { | 106 | public boolean containsAny(Set<DiscreteResource> other) { |
107 | - return !Sets.intersection(this.values(), other).isEmpty(); | 107 | + return other.stream() |
108 | + .filter(x -> !map.containsKey(x)) | ||
109 | + .anyMatch(x -> map.get(getClass(x)).contains(x)); | ||
108 | } | 110 | } |
109 | 111 | ||
110 | @Override | 112 | @Override | ... | ... |
-
Please register or login to post a comment