commit | 8add0f65d25102961ddb955927602f6c1b2ee575 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Thu Mar 16 18:32:59 2017 -0700 |
committer | Ray Milkey <ray@onlab.us> | Fri Mar 17 19:38:11 2017 +0000 |
tree | 60788efc296f1535aef537255ce897633410d264 | |
parent | a2a4f3499866fac4e93a3551d3debb361e58e345 [diff] |
Simplify the method chain Change-Id: I658cf03d9bff8a798f0ae84bea04300de49f6714
diff --git a/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java b/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java index 46237e0..1be2f01 100644 --- a/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java +++ b/core/api/src/main/java/org/onosproject/net/resource/ContinuousResourceId.java
@@ -63,9 +63,7 @@ String typeName = (String) lastComponent(); boolean foundInLeaf = typeName.equals(ancestor.getCanonicalName()); boolean foundInAncestor = components.subList(0, components.size()).stream() - .filter(x -> ancestor.isAssignableFrom(x.getClass())) - .findAny() - .isPresent(); + .anyMatch(x -> ancestor.isAssignableFrom(x.getClass())); return foundInAncestor || foundInLeaf; }