You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/09/15 14:48:07 UTC
DO NOT REPLY [Bug 23174] New: -
EqualsBuilder.append(Object[], Object[]) throws NPE
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23174>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23174
EqualsBuilder.append(Object[], Object[]) throws NPE
Summary: EqualsBuilder.append(Object[], Object[]) throws NPE
Product: Commons
Version: 2.0 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Lang
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: Maarten.Coene@qmedit.com
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