Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DBEB17B5F for ; Thu, 29 Jan 2015 13:08:46 +0000 (UTC) Received: (qmail 24304 invoked by uid 500); 29 Jan 2015 13:08:46 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 24230 invoked by uid 500); 29 Jan 2015 13:08:46 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 24220 invoked by uid 99); 29 Jan 2015 13:08:46 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 13:08:46 +0000 Received: from [10.132.1.241] (unknown [192.147.117.11]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 0C1CC1A012A for ; Thu, 29 Jan 2015 13:08:44 +0000 (UTC) Message-ID: <54CA30CD.2070408@apache.org> Date: Thu, 29 Jan 2015 14:08:29 +0100 From: =?UTF-8?B?TWljaGFlbCBEw7xyaWc=?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: Possible bugs / acknowledgement References: <54C93416.4080506@stanford.edu> In-Reply-To: <54C93416.4080506@stanford.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 28.1.15 8:10 , Johannes Birgmeier wrote: > === REPORT 1 === > In GlobPattern.java, in equals(), somebody wrote: > > return nodePath.equals(other.nodePath) && > (restriction == null) ? other.restriction == null : > restriction.equals(other.restriction); > > However, the ternary operator has lower precedence than &&, and thus the > hashCode/equals contract might be violated here. What you probably want is > > return nodePath.equals(other.nodePath) && > ((restriction == null) ? other.restriction == null : > restriction.equals(other.restriction)); See https://issues.apache.org/jira/browse/JCR-3847 Michael