avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: [Proposal] equals() and hashCode() impl in Parameters
Date Mon, 02 Aug 2004 12:21:11 GMT
On Monday 02 August 2004 20:05, Leo Simons wrote:

> all value objects in framework should have equals() and hashCode(), some
> have and should have toString(); and they should be serializable :-D

Ok, slowly digging through them all :o)

./api/src/java/org/apache/avalon/framework/Enum.java

contains a final public int hashCode()

and 
./api/src/java/org/apache/avalon/framework/ValuedEnum.java
extends Enum

And then it is possible to have two Enums considered equal() from name alone.

Both are abstract classes, so it is expected that something extends these, and 
inherit the same problem.


CTR; I am removing the "final", and adding hashCode() and equals() to 
ValuedEnum.


Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


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


Mime
View raw message