Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63CFF1124B for ; Mon, 22 Sep 2014 16:22:35 +0000 (UTC) Received: (qmail 19467 invoked by uid 500); 22 Sep 2014 16:22:34 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 19342 invoked by uid 500); 22 Sep 2014 16:22:34 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 19182 invoked by uid 99); 22 Sep 2014 16:22:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 16:22:34 +0000 Date: Mon, 22 Sep 2014 16:22:34 +0000 (UTC) From: "Bartosz Paszkowski (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LANG-1039) HashCodeBuilder.reflectionHashCode(Object object) returns always the same result for any array MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bartosz Paszkowski updated LANG-1039: ------------------------------------- Description: HashCodeBuilder.reflectionHashCode(Object object) returns always the same result for any array. The result is 17. There is no information in javadoc, that this method works in that way. The same situation in previous versions. *Example:* {code} public class HashCodeBuilderTest { public static void main(String[] args) { System.out.println(HashCodeBuilder.reflectionHashCode(new double[] {1, 1})); System.out.println(HashCodeBuilder.reflectionHashCode(new double[] {2, 2})); System.out.println(HashCodeBuilder.reflectionHashCode(new int[] {3, 3})); System.out.println(HashCodeBuilder.reflectionHashCode(new int[] {4, 4})); System.out.println(HashCodeBuilder.reflectionHashCode(new Long[] {5L, 5L})); System.out.println(HashCodeBuilder.reflectionHashCode(new Double[] {null, null})); System.out.println(HashCodeBuilder.reflectionHashCode(new Object[] {Boolean.FALSE, 1L, null})); } } {code} *Output:* {code} 17 17 17 17 17 17 17 {code} was: HashCodeBuilder.reflectionHashCode(Object object) returns always the same result for any array. The result is 17. There is no information in javadoc, that this method works in that way. The same situation in previous versions. Maybe it is a bug that sould be fixed? *Example:* {code} public class HashCodeBuilderTest { public static void main(String[] args) { System.out.println(HashCodeBuilder.reflectionHashCode(new double[] {1, 1})); System.out.println(HashCodeBuilder.reflectionHashCode(new double[] {2, 2})); System.out.println(HashCodeBuilder.reflectionHashCode(new int[] {3, 3})); System.out.println(HashCodeBuilder.reflectionHashCode(new int[] {4, 4})); System.out.println(HashCodeBuilder.reflectionHashCode(new Long[] {5L, 5L})); System.out.println(HashCodeBuilder.reflectionHashCode(new Double[] {null, null})); System.out.println(HashCodeBuilder.reflectionHashCode(new Object[] {Boolean.FALSE, 1L, null})); } } {code} *Output:* {code} 17 17 17 17 17 17 17 {code} > HashCodeBuilder.reflectionHashCode(Object object) returns always the same result for any array > ---------------------------------------------------------------------------------------------- > > Key: LANG-1039 > URL: https://issues.apache.org/jira/browse/LANG-1039 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* > Affects Versions: 3.3.2 > Environment: Windows 7, Java 6 > Reporter: Bartosz Paszkowski > > HashCodeBuilder.reflectionHashCode(Object object) returns always the same result for any array. The result is 17. > There is no information in javadoc, that this method works in that way. > The same situation in previous versions. > *Example:* > {code} > public class HashCodeBuilderTest { > > public static void main(String[] args) { > > System.out.println(HashCodeBuilder.reflectionHashCode(new double[] {1, 1})); > System.out.println(HashCodeBuilder.reflectionHashCode(new double[] {2, 2})); > System.out.println(HashCodeBuilder.reflectionHashCode(new int[] {3, 3})); > System.out.println(HashCodeBuilder.reflectionHashCode(new int[] {4, 4})); > System.out.println(HashCodeBuilder.reflectionHashCode(new Long[] {5L, 5L})); > System.out.println(HashCodeBuilder.reflectionHashCode(new Double[] {null, null})); > System.out.println(HashCodeBuilder.reflectionHashCode(new Object[] {Boolean.FALSE, 1L, null})); > > } > } > {code} > *Output:* > {code} > 17 > 17 > 17 > 17 > 17 > 17 > 17 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)