Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BDF210E57 for ; Mon, 9 Feb 2015 11:46:54 +0000 (UTC) Received: (qmail 8255 invoked by uid 500); 9 Feb 2015 11:46:54 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 8219 invoked by uid 500); 9 Feb 2015 11:46:53 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 8207 invoked by uid 99); 9 Feb 2015 11:46:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Feb 2015 11:46:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 09 Feb 2015 11:46:52 +0000 Received: (qmail 1230 invoked by uid 99); 9 Feb 2015 11:45:17 -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; Mon, 09 Feb 2015 11:45:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 19DBCDFDF3; Mon, 9 Feb 2015 11:45:16 +0000 (UTC) From: ahgittin To: dev@brooklyn.incubator.apache.org Reply-To: dev@brooklyn.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-brooklyn pull request: Active partial rebind allowing ca... Content-Type: text/plain Message-Id: <20150209114517.19DBCDFDF3@git1-us-west.apache.org> Date: Mon, 9 Feb 2015 11:45:16 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user ahgittin commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/506#discussion_r24322893 --- Diff: api/src/main/java/brooklyn/basic/AbstractBrooklynObjectSpec.java --- @@ -121,4 +121,21 @@ protected final void checkIsImplementation(Class val, Class requir if (Modifier.isAbstract(val.getModifiers())) throw new IllegalStateException("Implementation "+val+" is abstract, but must be a non-abstract class"); } + @Override + public boolean equals(Object obj) { + if (obj==null) return false; --- End diff -- i don't think it breaks the contract of hashcode -- if a spec is modified in such a way that the hashcode changes, then the equality semantics will have changed in the expected way. as we already have `Object.equals/hashcode` i think this implementation is an improvement, and putting things into a test convenience would just make things harder to find. making the spec immutable would be the elegant way to solve this; i wouldn't be strongly opposed although i don't see any major benefit at this time for the extra code. (is spec mutability confusion really a problem?) --- 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. ---