ahgittin commented on a change in pull request #1200: URL: https://github.com/apache/brooklyn-server/pull/1200#discussion_r669660476
########## File path: core/src/main/java/org/apache/brooklyn/core/objs/proxy/InternalEntityFactory.java ########## @@ -465,12 +487,30 @@ public void run() { } return super.constructOldStyle(clazz, flags); } - + private <T extends Entity> Class<? extends T> getImplementedBy(EntitySpec<T> spec) { if (spec.getImplementation() != null) { return spec.getImplementation(); } else { return entityTypeRegistry.getImplementedBy(spec.getType()); } } + + private List<EntityInitializer> getDefaultInitializers() { + return Arrays.stream(managementContext.getConfig().getConfig(DEFAULT_INITIALIZERS_CLASSNAMES).split(",")) + .filter(Strings::isNonEmpty) + .map(className -> { + try { Review comment: to load a java class, use `JavaBrooklynClassLoadingContext.create(mgmt).tryLoadClass(className)` -- has slightly better classpath semantics also i wonder whether we should try the type registry first? (longer term i'd like to clean up and standardize better how we instantiate things!) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brooklyn.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org