Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/506#discussion_r24321455
--- Diff: core/src/main/java/brooklyn/catalog/internal/CatalogUtils.java ---
@@ -227,4 +228,13 @@ public static String getVersionedId(String id, String
version) {
}
}
+ @Beta
+ public static EntitySpec<?> createEntitySpec(ManagementContext mgmt,
CatalogItem<?, ?> catalogItem) {
--- End diff --
This is currently only used for tests - should we move it to
`src/test/java` instead?
My concern is that this doesn't necessarily do the full thing that the
original `CatalogItem` did - for example, the `CatalogItem.getPlanYaml()` is
ignored (i.e. whatever other config was supplied in that yaml will be ignored),
and also it assumes the `CatalogItem` is for an `EntitySpec`. That's all fine
to assume for tests, but doesn't feel right for core code (even if it is marked
`@Beta`).
---
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.
---