Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C7A64200CC6 for ; Tue, 18 Jul 2017 17:12:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C65AA16705C; Tue, 18 Jul 2017 15:12:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F26916705B for ; Tue, 18 Jul 2017 17:12:23 +0200 (CEST) Received: (qmail 65289 invoked by uid 500); 18 Jul 2017 15:12:23 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 65266 invoked by uid 99); 18 Jul 2017 15:12:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2017 15:12:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 17356DFA6C; Tue, 18 Jul 2017 15:12:22 +0000 (UTC) From: geomacy To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #746: Auto wrap YAML BOMs as catalog bundles Content-Type: text/plain Message-Id: <20170718151222.17356DFA6C@git1-us-west.apache.org> Date: Tue, 18 Jul 2017 15:12:22 +0000 (UTC) archived-at: Tue, 18 Jul 2017 15:12:24 -0000 Github user geomacy commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/746#discussion_r127952482 --- Diff: core/src/main/java/org/apache/brooklyn/core/typereg/BasicRegisteredType.java --- @@ -153,4 +160,49 @@ public String toString() { (getPlan()!=null ? ";"+getPlan().getPlanFormat() : "")+ "]"; } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((aliases == null) ? 0 : aliases.hashCode()); + result = prime * result + ((bundles == null) ? 0 : bundles.hashCode()); + result = prime * result + ((containingBundle == null) ? 0 : containingBundle.hashCode()); + result = prime * result + (deprecated ? 1231 : 1237); + result = prime * result + ((description == null) ? 0 : description.hashCode()); + result = prime * result + (disabled ? 1231 : 1237); + result = prime * result + ((displayName == null) ? 0 : displayName.hashCode()); + result = prime * result + ((iconUrl == null) ? 0 : iconUrl.hashCode()); + result = prime * result + ((implementationPlan == null) ? 0 : implementationPlan.hashCode()); + result = prime * result + ((kind == null) ? 0 : kind.hashCode()); + result = prime * result + ((superTypes == null) ? 0 : superTypes.hashCode()); + result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode()); + result = prime * result + ((tags == null) ? 0 : tags.hashCode()); + result = prime * result + ((version == null) ? 0 : version.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + BasicRegisteredType other = (BasicRegisteredType) obj; + if (!Objects.equal(aliases, other.aliases)) return false; + if (!Objects.equal(bundles, other.bundles)) return false; + if (!Objects.equal(containingBundle, other.containingBundle)) return false; + if (!Objects.equal(deprecated, other.deprecated)) return false; --- End diff -- missing `if (!Objects.equal(description, other. description)) return false;` --- 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. ---