Sho SHIMIZU
Committed by Gerrit Code Review

Avoid extracting resource set from backing range set

This is one of fixes for ONOS-4684

Change-Id: I6170d466f168f0b2299f96c623e5435c6631ba12
...@@ -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
......