You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/07/14 14:05:30 UTC

[GitHub] [brooklyn-server] ahgittin commented on a change in pull request #1200: Add support setup default initializers for all deployment

ahgittin commented on a change in pull request #1200:
URL: https://github.com/apache/brooklyn-server/pull/1200#discussion_r669647198



##########
File path: core/src/main/java/org/apache/brooklyn/core/objs/proxy/InternalEntityFactory.java
##########
@@ -369,6 +385,12 @@ public void run() {
                 }
                 ((AbstractEntity)entity).addLocations(spec.getLocations());
 
+                List<EntityInitializer> initializers = Stream.concat(spec.getInitializers().stream(), getDefaultInitializers().stream())

Review comment:
       this will run `spec.getInitializers()` _before_ default / global initializers, whereas i think default / globals should run first
   
   also we have the lines below 394-396 which run `spec.getInitializers()` _again_ after
   
   suggest this should just be `getDefaultInitializers().forEach(i -> i.apply(entity))` -- no need to concat streams




-- 
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-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org