Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/78#discussion_r57306501
--- Diff: core/src/main/java/org/apache/brooklyn/util/core/osgi/Osgis.java
---
@@ -181,11 +181,11 @@ public BundleFinder requiringFromUrl(String url) {
public List<Bundle> findAll() {
boolean urlMatched = false;
List<Bundle> result = MutableList.of();
- for (Bundle b: framework.getBundleContext().getBundles()) {
+ allBundles: 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 (!predicate.apply(b)) continue allBundles;
--- End diff --
+1 i don't like labels here, and in any case i think the inner loop as svet
suggests can be replaced by one line
if (!Predicates.and(predicates).apply(b)) continue;
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---