brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbouron <>
Subject [GitHub] brooklyn-server pull request #608: `BundleMaker` REST call allowing to add Z...
Date Mon, 27 Mar 2017 07:04:52 GMT
Github user tbouron commented on a diff in the pull request:
    --- Diff: rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/
    @@ -245,13 +246,21 @@ public Response createFromArchive(byte[] zipInput) {
                 if (!BrooklynFeatureEnablement.isEnabled(BrooklynFeatureEnablement.FEATURE_LOAD_BUNDLE_CATALOG_BOM))
                     // if the above feature is not enabled, let's do it manually (as a contract
of this method)
    -                new CatalogBomScanner().new CatalogPopulator(
    -                        ((LocalManagementContext) mgmt()).getOsgiManager().get().getFramework().getBundleContext(),
    -                        mgmt()).addingBundle(bundle, null);
    +                try {
    +                    new CatalogBundleLoader(new CatalogBomScanner(), mgmt()).scanForCatalog(bundle);
    --- End diff --
    @geomacy Yup, the dependency on `CatalogBomScanner` is ugly. I knew it had to be changed
but wanted this to be merged as soon as possible so I just moved the code around rather than
really refactor.
    Re the whitelist injection for the REST API: I was wondering what if we add the `CatalogBomScanner`
to the new `ScratchPad` area? It's supposed to be a singleton isn't it? We can then get back
the correctly setup predicate from it.

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