Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.0
-
None
-
None
-
Operating System: Mac OS X 10.3
Platform: Macintosh
-
33067
Description
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 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 .
Attachments
Attachments
Activity
Workflow | jira [ 12370899 ] | Default workflow, editable Closed status [ 12602395 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Fix Version/s | 2.2 [ 12311702 ] |
Affects Version/s | 2.0 Final [ 12311706 ] |
Component/s | Lang [ 12311121 ] | |
Fix Version/s | 2.2 [ 12311686 ] | |
Key |
|
|
Project | Commons [ 12310458 ] | Commons Lang [ 12310481 ] |
Affects Version/s | 2.0 Final [ 12311658 ] | |
Assignee | Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ] |
Field | Original Value | New Value |
---|---|---|
issue.field.bugzillaimportkey | 33067 | 12341994 |