commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26616] - ClassCastException in Enum.equals(Object)
Date Wed, 11 Feb 2004 21:01:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26616>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26616

ClassCastException in Enum.equals(Object)





------- Additional Comments From brent@worden.org  2004-02-11 21:01 -------
I changed the Enum.equals method to avoid cast exceptions.  The thought being, 
an equality check between objects of different types should return false and 
not raise an exception.

The unit test assures a ClassCastException is not thrown when comparing objects 
of different types.

FYI, by different types I mean objects that fail an instanceof check.

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


Mime
View raw message