Skip to content

Commit

Permalink
Skip to next bundle on predicate failure.
Browse files Browse the repository at this point in the history
Without this change, if the predicate fails, the code flow just picks the next predicate to check,
when really we want to skip to checking the next bundle.
  • Loading branch information
geomacy committed Mar 24, 2016
1 parent b8211ed commit 71932b2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ public List<Bundle> findAll() {
for (Bundle b: framework.getBundleContext().getBundles()) {
if (symbolicName!=null && !symbolicName.equals(b.getSymbolicName())) continue;
if (version!=null && !Version.parseVersion(version).equals(b.getVersion())) continue;
for (Predicate<? super Bundle> predicate: predicates) {
if (!predicate.apply(b)) continue;
}
if (!Predicates.and(predicates).apply(b)) continue;

// check url last, because if it isn't mandatory we should only clear if we find a url
// for which the other items also match
Expand Down

0 comments on commit 71932b2

Please sign in to comment.