Peter Donald wrote:
> 
> Hi,
> 
> I mucked about and noticed that only one method of ObjectUtils is actually
> used and only in two places. This patch removes need for ObjectUtils by
> pushing that single method (equals(o1,o2)) into the places where it is
> actually used. The theory being that this simplifies readability of code and
> removes a class that added complexity but wasn't really used.

A much simpler patch to improve readability and maintainability is to
add a comment where the code is being used.

// compares objects using Object.equals() method while allowing for null
values
ObjectUtils.equals(o1, o2);

duplicating the code in this method all over the place does not strike
me as a better solution.


> 
> After applying patch you should be able to do a
> 
> cvs rm ...ObjectUtils.java

I use this class.  I am sure others do also.  This class used to belong
to the utility code found in Turbine-2 and was moved here as torque was
using the equals method.  Not every class in Turbine had to be used by
the turbine package.  It can be there to be used by application code. 
It seems like this code belongs more in a package within the commons
repo, but until it is moved to a more appropriate location within
jakarta, I want it left where it is.  And I do not see any reason torque
should not use it.

-1

john mcnally

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to