Skip to content

Commit

Permalink
Closes #78
Browse files Browse the repository at this point in the history
Skip to next bundle on predicate failure.

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
neykov committed Mar 25, 2016
2 parents fafff2d + 71932b2 commit f4be190
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 f4be190

Please sign in to comment.