Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 22403 invoked from network); 12 Jan 2005 17:51:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Jan 2005 17:51:15 -0000 Received: (qmail 60512 invoked by uid 500); 12 Jan 2005 17:51:11 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 60022 invoked by uid 500); 12 Jan 2005 17:51:10 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 60009 invoked by uid 99); 12 Jan 2005 17:51:10 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 12 Jan 2005 09:51:08 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (8.12.11/8.12.11) with ESMTP id j0CHp5rl007563 for ; Wed, 12 Jan 2005 18:51:05 +0100 Received: (from nobody@localhost) by ajax.apache.org (8.12.11/8.12.11/Submit) id j0CHp5Ra007561; Wed, 12 Jan 2005 18:51:05 +0100 Date: Wed, 12 Jan 2005 18:51:05 +0100 Message-Id: <200501121751.j0CHp5Ra007561@ajax.apache.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 33067] New: - EqualsBuilder.append(Object[], Object[]) crashes with a NullPointerException if an element of the first array is null X-Bugzilla-Reason: AssignedTo X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33067 Summary: EqualsBuilder.append(Object[], Object[]) crashes with a NullPointerException if an element of the first array is null Product: Commons Version: 2.0 Final Platform: Macintosh OS/Version: Mac OS X 10.3 Status: NEW Keywords: PatchAvailable Severity: critical Priority: P1 Component: Lang AssignedTo: commons-dev@jakarta.apache.org ReportedBy: andrew@terracottatech.com If you use EqualsBuilder.append(Object[], Object[]), and the first array contains an element that is null (and before any other mismatches between the arrays are present), then EqualsBuilder will throw a NullPointerException at line 513. Steps to reproduce: Object[] x1 = new Object[] { new Integer(1), null, new Integer(3) }; Object[] x2 = new Object[] { new Integer(1), new Integer(2), new Integer(3) }; new EqualsBuilder().append(x1, x2); The third line of this program will crash. Attached is a patch that fixes this bug and adds code to an existing unit-test case that proves it's fixed (i.e., the test fails without the source patch, and passes with it, and is a valid test). This patch also fixes another bug related to exact types of objects in an array (which I'm about to enter, and which I will relate to this bug if I figure out how :-). -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org