commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (LANG-1034) Add support for recursive comparison to EqualsBuilder#reflectionEquals
Date Tue, 03 Oct 2017 15:15:00 GMT


ASF GitHub Bot commented on LANG-1034:

Github user douddle commented on the issue:
    I start to use your feature and I discover a bug.
    String are now compared with internal data (hash and char[]). But sometimes hash value
is not initialized, this is probably a cache for the hashcode. So the comparison fails even
if the char[] content is the same.

> Add support for recursive comparison to EqualsBuilder#reflectionEquals
> ----------------------------------------------------------------------
>                 Key: LANG-1034
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.builder.*
>            Reporter: Duncan Jones
>            Assignee: Pascal Schumacher
>             Fix For: 3.6
>         Attachments: LANG-1034.1.patch
> The current implementation of {{EqualsBuilder.reflectionEquals()}} uses object equality
to test reference fields found in the class. It may be helpful to offer a method that recursively
builds {{.equals()}} methods for each field and uses that to perform the comparison.
> This functionality could be further extended by accepting a list of classes to include/exclude.
Classes that are excluded would use the normal object equality.

This message was sent by Atlassian JIRA

View raw message