brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] incubator-brooklyn pull request: Adds support for interfaces tag o...
Date Thu, 19 Nov 2015 14:32:43 GMT
Github user neykov commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/brooklyn/core/catalog/internal/
    @@ -859,6 +869,34 @@ private String makeAsIndentedObject(String yaml) {
             log.debug("Adding manual catalog item to "+mgmt+": "+yaml);
             checkNotNull(yaml, "yaml");
             List<CatalogItemDtoAbstract<?, ?>> result = collectCatalogItems(yaml);
    +        // Iterate over the results to add the interfaces tag. We are doing this here
to be able to get the backward-types.
    +        for (final CatalogItemDtoAbstract<?, ?> item : result) {
    +            if (item.getCatalogItemType().equals(CatalogItemType.ENTITY) || item.getCatalogItemType().equals(CatalogItemType.TEMPLATE))
    +                Class<?> type = CatalogUtils.newClassLoadingContext(mgmt, item).tryLoadClass(item.getReferenceType()).orNull();
    --- End diff --
    I think it would be easier to create a spec out of the catalog item and get the type from
there. What if referenceType is another catalog item.

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