Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/1017#discussion_r45053285
--- Diff:
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogUtils.java
---
@@ -85,16 +89,23 @@ public static BrooklynClassLoadingContext
getClassLoadingContext(Entity entity)
}
public static BrooklynClassLoadingContext
newClassLoadingContext(@Nullable ManagementContext mgmt, String catalogItemId,
Collection<? extends OsgiBundleWithUrl> libraries) {
+ return newClassLoadingContext(mgmt, catalogItemId, libraries,
null);
+ }
+
+ public static BrooklynClassLoadingContext
newClassLoadingContext(@Nullable ManagementContext mgmt, String catalogItemId,
Collection<? extends OsgiBundleWithUrl> libraries, BrooklynClassLoadingContext
loader) {
BrooklynClassLoadingContextSequential result = new
BrooklynClassLoadingContextSequential(mgmt);
if (libraries!=null && !libraries.isEmpty()) {
result.add(new OsgiBrooklynClassLoadingContext(mgmt,
catalogItemId, libraries));
}
- BrooklynClassLoadingContext loader =
BrooklynLoaderTracker.getLoader();
- if (loader != null) {
+ if (loader !=null) {
--- End diff --
+1 to tightening this; i've added some TODO comments and deprecation to
move us in this direction
---
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.
---