brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #442: BROOKLYN-379: Fix rebind when bundle pref...
Date Mon, 28 Nov 2016 16:21:47 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/442#discussion_r89816716
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/ha/OsgiManager.java ---
    @@ -189,10 +194,15 @@ public static boolean isBundleNameEqualOrAbsent(CatalogBundle bundle,
Bundle b)
                     Maybe<Bundle> bundle = findBundle(osgiBundle);
                     if (bundle.isPresent()) {
                         Bundle b = bundle.get();
    -                    Class<T> clazz;
    +                    Optional<String> strippedType = osgiClassPrefixer.stripMatchingPrefix(b,
type);
    +                    String typeToLoad = strippedType.isPresent() ? strippedType.get()
: type;
    +                    if (osgiClassPrefixer.hasPrefix(typeToLoad)) {
    +                        bundleProblems.put(osgiBundle, new UserFacingException("Bundle
does not match prefix in type name '"+typeToLoad+"'"));
    +                        continue;
    +                    }
    --- End diff --
    
    `getResource(s)` needs the same update. Turns out we can't load prefixed resources when
combined with `brooklyn.libraries`.
    Could be addressed as another PR.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message