Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/338#discussion_r112699602
--- Diff:
core/src/main/java/org/apache/brooklyn/core/objs/AbstractBrooklynObject.java ---
@@ -83,11 +90,18 @@ public AbstractBrooklynObject(Map<?, ?> properties) {
// correct behaviour should be to inherit context's search path,
perhaps, though maybe that's better done as spec?
// in any case, should not define it as _the_ catalog item ID;
also see assignment based on parent
// in CatalogUtils.setCatalogItemIdOnAddition
- catalogItemId =
ApiObjectsFactory.get().getCatalogItemIdFromContext();
+
setCatalogItemId(ApiObjectsFactory.get().getCatalogItemIdFromContext());
--- End diff --
context ID should be added to the _search path_ not used to set the ID of
the item itself -- this was the problem spot that prompted keeping the IDs
separate
and can remove the TODO now! :)
---
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 [email protected] or file a JIRA ticket
with INFRA.
---