Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/880#discussion_r149097024
  
    --- Diff: api/src/main/java/org/apache/brooklyn/api/entity/EntitySpec.java 
---
    @@ -112,12 +118,29 @@
         private final List<Entity> members = Lists.newArrayList();
         private final List<Group> groups = Lists.newArrayList();
         private volatile boolean immutable;
    -    
    +
    +    // Kept for backwards compatibility of persisted state
    +    private List<Policy> policies;
    +    private List<Enricher> enrichers;
    +
         public EntitySpec(Class<T> type) {
             super(type);
         }
     
         @Override
    +    protected Object readResolve() {
    +        if (policies != null && policies.size() > 0) {
    --- End diff --
    
    personal preference for `&& !policies.isEmpty()`


---

Reply via email to