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 26470] - TreeBidiMap.put(Object, Object) throws ClassCastException
Date Fri, 30 Jan 2004 21:04:35 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=26470>.
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=26470

TreeBidiMap.put(Object, Object) throws ClassCastException

jeff-apache_bugzilla@spamproof.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|Major                       |Enhancement
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From jeff-apache_bugzilla@spamproof.net  2004-01-30 21:04 -------
Playing devil's advocate for a moment... if both objects need to implement 
Comparable, why not add a put(Comparable, Comparable) method to TreeBidiMap, 
and have put(Object, Object) throw an IllegalArgumentException that explicitly 
identifies the arguments' non-Comparability as the problem?

Of course, I'm taking for granted that signatures are dynamically checked for 
specificity at runtime and not limited to those the compiler explicitly knew 
about at compile time (It's been a while since I've tiptoed through THAT dimly-
lit corner of the Java universe), but I'd be fairly shocked if the proper 
behavior were for the JVM to stupidly ignore TreeBidiMap's put(Comparable, 
Comparable) method (if one were added) and pass the call along to its put
(Object, Object) method instead since that's all a generic Map-implementing 
object has... ;-)

---------------------------------------------------------------------
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