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

    https://github.com/apache/incubator-brooklyn/pull/1039#discussion_r45246236
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/BrooklynTags.java ---
    @@ -51,9 +53,40 @@ public String getContents() {
                 return contents;
             }
         }
    +
    +    public static class InterfacesTag {
    +        @JsonProperty
    +        final List<Class<?>> interfaces;
    +
    +        public InterfacesTag(List<Class<?>> interfaces) {
    +            this.interfaces = interfaces;
    +        }
    +
    +        public List<Class<?>> getInterfaces() {
    +            return interfaces;
    +        }
    +
    +        @Override
    +        public boolean equals(Object o) {
    +            if (this == o) return true;
    +            if (o == null || getClass() != o.getClass()) return false;
    +
    +            InterfacesTag that = (InterfacesTag) o;
    +
    +            return !(interfaces != null ? 
!interfaces.equals(that.interfaces) : that.interfaces != null);
    --- End diff --
    
    All that negation is a bit of a confusing way to phrase it ☺ How about:
    ```
                return interfaces == null 
                                ? that.interfaces == null 
                                : interfaces.equals(that.interfaces);
    ```


---
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.
---

Reply via email to