Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
None
-
Operating System: other
Platform: Other
-
23174
Description
Hi,
if you append array's which contains null values to an EqualsBuilder instance,
a NPE is thrown. This causes troubles in the ArrayUtils.isEquals(Object[],
Object[]) method as well because it uses the EqualsBuilder class.
To duplicate: execute this code:
Object[] array1 = new Object[]
{"1", null, "2"};Object[] array2 = new Object[] {"1", null, "2"}
;
new EqualsBuilder().append(array1, array2).isEquals();
and you'll get this Exception:
java.lang.NullPointerException
at org.apache.commons.lang.builder.EqualsBuilder.append(EqualsBuilder.java:513)
kind regards,
Maarten Coene