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 {
@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
......