brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <>
Subject [GitHub] brooklyn-server pull request: Add a label to predicates check in f...
Date Thu, 24 Mar 2016 11:54:01 GMT
Github user ahgittin commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/osgi/ ---
    @@ -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()))
                     if (version!=null && !Version.parseVersion(version).equals(b.getVersion()))
                     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 or file a JIRA ticket
with INFRA.

View raw message