You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2006/05/16 19:47:07 UTC
[jira] Reopened: (LANG-67) [lang] NPE in EqualsBuilder when field
in multiarray == null
[ http://issues.apache.org/jira/browse/LANG-67?page=all ]
Henri Yandell reopened LANG-67:
-------------------------------
Reopening so I can resolve it. Seen this happen occasionally in Jira, though only previously when the workflow was being mucked around with. Artifact of the migration I guess - having an issue that is closed but has an unresolved status.
> [lang] NPE in EqualsBuilder when field in multiarray == null
> ------------------------------------------------------------
>
> Key: LANG-67
> URL: http://issues.apache.org/jira/browse/LANG-67
> Project: Commons Lang
> Type: Bug
> Versions: 2.0
> Environment: Operating System: All
> Platform: All
> Reporter: Michael
>
> The EqualsBuilder.append(Object[] lhs, Object[] rhs) gives a Nullpointer in
> cases of multi dimensional arrays with null fields when reflectEqual an object
> containing a 3D Object array.
> Fix:
> <...>
> for (int i = 0; i < lhs.length && isEquals; ++i) {
> // Fix when element is null
> if ( lhs[i] != null ) {
> Class lhsClass = lhs[i].getClass();
> if (!lhsClass.isInstance(rhs[i])) {
> isEquals = false; //If the types don't match, not equal
> break;
> }
> }
> append(lhs[i], rhs[i]);
> }
> <...>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org