brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: CLI commands for manipulating cat...
Date Thu, 21 May 2015 10:18:59 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/617#discussion_r30789390
  
    --- Diff: core/src/main/java/brooklyn/catalog/internal/CatalogItemDtoAbstract.java ---
    @@ -162,6 +163,37 @@ public String getPlanYaml() {
         }
     
         @Override
    +    public int hashCode() {
    +        return Objects.hashCode(symbolicName, planYaml, javaType, nullIfEmpty(libraries),
version, getCatalogItemId());
    +    }
    +
    +    @Override
    +    public boolean equals(Object obj) {
    +        if (this == obj) return true;
    +        if (obj == null) return false;
    +        if (getClass() != obj.getClass()) return false;
    +        CatalogItemDtoAbstract<?,?> other = (CatalogItemDtoAbstract<?,?>)
obj;
    +        if (!Objects.equal(symbolicName, other.symbolicName)) return false;
    +        if (!Objects.equal(planYaml, other.planYaml)) return false;
    +        if (!Objects.equal(javaType, other.javaType)) return false;
    +        if (!Objects.equal(nullIfEmpty(libraries), nullIfEmpty(other.libraries))) return
false;
    +        if (!Objects.equal(getCatalogItemId(), other.getCatalogItemId())) return false;
    +        if (!Objects.equal(version, other.version)) return false;
    +        if (!Objects.equal(deprecated, other.deprecated)) return false;
    +        if (!Objects.equal(description, other.description)) return false;
    +        if (!Objects.equal(displayName, other.displayName)) return false;
    +        if (!Objects.equal(iconUrl, other.iconUrl)) return false;
    +        if (!Objects.equal(tags, other.tags)) return false;
    +        // 'type' not checked, because deprecated, we might want to allow removal in
future
    --- End diff --
    
    `symbolicName` is set to `type.getName()`, so shouldn't matter.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message