commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LANG-466) Please expose setEquals(boolean) as public so EqualsBuilder instances can be reused
Date Thu, 06 Nov 2008 20:44:48 GMT

     [ https://issues.apache.org/jira/browse/LANG-466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell updated LANG-466:
-------------------------------

    Fix Version/s: 3.0

> Please expose setEquals(boolean) as public so EqualsBuilder instances can be reused
> -----------------------------------------------------------------------------------
>
>                 Key: LANG-466
>                 URL: https://issues.apache.org/jira/browse/LANG-466
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.4
>            Reporter: Lauren Bish
>            Priority: Minor
>             Fix For: 3.0
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> I use EqualsBuilder a lot in equals methods for POJOs and sometimes in utility methods
to compare properties in DAOs. These methods get called a lot in my apps, and I would prefer
to reuse an instance of EqualsBuilder instead of creating a new instance every time the methods
are called. In one method, where I retrieve data from a database, a comparison method could
be called thousands of times in a second. Yes, I have been careful about being threadsafe
in my reuse of a single EqualsBuilder instance.
> The problem is that (as I understand it), once an instance of EqualsBuilder has set isEquals
to false, it stays false and all comparisons thereafter return false whether equal or not.
I have overriden the setEquals() method to be public and call this before I start the comparison
in my methods and this allows me to reuse EqualsBuilder. 
> I believe setEquals() should be changed to be public in EqualsBuilder as others surely
use it in a similar manner.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message