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: Add catalog.bom application white/bl...
Date Wed, 20 Apr 2016 15:28:49 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/106#discussion_r60430312
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
---
    @@ -121,25 +157,27 @@ public void removedBundle(Bundle bundle, BundleEvent bundleEvent,
Iterable<? ext
                     return;
                 }
                 LOG.debug("Unloading catalog BOM entries from {} {} {}", bundleIds(bundle));
    -            final BrooklynCatalog catalog = getManagementContext().getCatalog();
                 for (CatalogItem<?, ?> item : items) {
                     LOG.debug("Unloading {} {} from catalog", item.getSymbolicName(), item.getVersion());
     
    -                try {
    -                    catalog.deleteCatalogItem(item.getSymbolicName(), item.getVersion());
    -                } catch (Exception e) {
    -                    // Gobble exception to avoid possibility of causing problems stopping
bundle.
    -                    LOG.warn("Caught {} unloading {} {} from catalog, ignoring", new
String [] {
    -                        e.getMessage(), item.getSymbolicName(), item.getVersion()
    -                    });
    -                    Exceptions.propagateIfFatal(e);
    -                }
    +                removeFromCatalog(item);
    +            }
    +        }
    +
    +        private void removeFromCatalog(CatalogItem<?, ?> item) {
    +            try {
    +                getManagementContext().getCatalog().deleteCatalogItem(item.getSymbolicName(),
item.getVersion());
    +            } catch (Exception e) {
    +                Exceptions.propagateIfFatal(e);
    +                LOG.warn(Strings.join(new String[] {
    +                    "Failed to remove", item.getSymbolicName(), item.getVersion(), "{}
{} from catalog"
    --- End diff --
    
    Remove `{} {}`


---
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