commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita" <brunodepau...@yahoo.com.br>
Subject [functor] Remove duplicated equals() methods
Date Thu, 10 May 2012 18:27:33 GMT
Hi all, 

While I am still trying to find time to work on a proposal for enhancements in the generators
API in [functor] (https://issues.apache.org/jira/browse/FUNCTOR-14), I'm reviewing other pending
issues, including the one regarding test coverage. 

The comparators API seemed to be lacking tests for some decision branches. But looking closely
at the code, I realized that there were two equals code in some comparator functors. Then
I set up a Sonar instance to scan the code, and found that it is common in many other parts
of the code (http://66.228.56.222/sonar/drilldown/violations/org.apache.commons:commons-functor?severity=CRITICAL).

Does anybody know if there is some reason for having both equals(Object that) and equals(SomeFunctor<?>
that)? I think we could merge both methods in only one. The Generators in [functor] have only
one equals() method, and compares against this, uses instanceof, etc. I had a quick look on
[math3] and [lang3], and looks like they both use only one equals() method, compares against
this, uses instaceof, etc.

If there is no objection here, I could create a patch for this in Jira, merging both equals()
methods in one :-) Then after this I will proceed writing tests to increase the test coverage
(https://issues.apache.org/jira/browse/FUNCTOR-12).

Thanks in advance! 

Bruno P. Kinoshita
http://kinoshita.eti.br
http://tupilabs.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message