You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2013/10/25 10:20:30 UTC
[jira] [Closed] (LANG-905) Compare between arrays
[ https://issues.apache.org/jira/browse/LANG-905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed LANG-905.
------------------------------
Resolution: Fixed
Fix Version/s: (was: Review Patch)
3.2
svn ci -m "Applying Thomas Neidhart's patch for LANG-905; fixing a bug in which EqualsBuilder considers two arrays of the same type to be equal, without considering the contents" src
Sending src/changes/changes.xml
Sending src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
Sending src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java
Transmitting file data ...
Committed revision 1535653.
> Compare between arrays
> ----------------------
>
> Key: LANG-905
> URL: https://issues.apache.org/jira/browse/LANG-905
> Project: Commons Lang
> Issue Type: Bug
> Reporter: E
> Labels: patch
> Fix For: 3.2
>
> Attachments: LANG-905.patch
>
>
> when comparing 2 arrays, EqualsBuilder returns true even if they contain different elements.
> example:
> Object[] o1 = new Object[1];
> o1[0]="Hello";
>
> Object[] o2 = new Object[1];
> o2[0]="Bye";
>
> System.out.println(EqualsBuilder.reflectionEquals(o1, o2, true));
--
This message was sent by Atlassian JIRA
(v6.1#6144)