You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/01/27 19:03:07 UTC
DO NOT REPLY [Bug 26470] New: -
TreeBidiMap.put(Object, Object) throws ClassCastException
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
Summary: TreeBidiMap.put(Object, Object) throws
ClassCastException
Product: Commons
Version: 3.0 Final
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Major
Priority: Other
Component: Collections
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: jeff-apache_bugzilla@spamproof.net
The following code throws a ClassCastException when compiled and executed within
Netbeans 3.5.1, j2sdk 1.4.2_02:
package watch.me.die;
import org.apache.commons.collections.*;
import org.apache.commons.collections.bidimap.*;
public class CrashBidiMap{
public static void main(String[] args) throws Exception {
BidiMap broken = new TreeBidiMap();
Object foo = new Object();
Object bar = new Object();
broken.put(foo, bar); //boom. ClassCastException.
}
}
The javadoc implies that there might be objects it finds objectionable, but says
nothing about what might or might not constitute "acceptable" or "objectionable".
It's not inconceivable that this might be arising from a non-obvious classloader
collision with an older version of Collections (bundled with Tomcat and/or
Netbeans) somewhere in the classpath above the Netbeans project's /WEB-INF/libs
directory... but if it is, it should be prominently noted somewhere because lots
and lots of users are likely to trip over it if that's the case (particularly if
there's no easy way to remove or replace the older jarfile without breaking
Tomcat and/or Netbeans itself). The relevant portion of Netbeans' ide.log follows:
-------------------------------------------------------------------------------
>Log Session: Tuesday, January 27, 2004 10:53:30 AM EST
>System Info:
Product Version = NetBeans IDE 3.5.1 (Build 200307302351)
IDE Versioning = IDE/1 spec=3.42.2 impl=200307302351
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.4.2_02; Java HotSpot(TM) Client VM 1.4.2_02-b03; Sun
Microsystems Inc.
Java Home = C:\j2sdk1.4.2_02\jre
System Locale; Encod. = en_US; Cp1252
Home Dir; Current Dir = C:\Documents and Settings\jskubick; C:\Program
Files\NetBeans IDE 3.5.1
IDE Install; User Dir = C:\Program Files\NetBeans IDE 3.5.1; C:\Documents and
Settings\jskubick\.netbeans\3.5
CLASSPATH = C:\Program Files\NetBeans IDE
3.5.1\lib\ext\boot.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\crimson-1.1.3.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\msbase.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\mssqlserver.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\msutil.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\mysql-connector-java-3.0-nightly-20040108-bin.jar;C:\Program
Files\NetBeans IDE 3.5.1\lib\ext\nls_charset12.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\ojdbc14.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\regexp-1.2.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\xerces-2.0.2.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\ext\xml-apis-1.0b2.jar;C:\j2sdk1.4.2_02\lib\dt.jar;C:\j2sdk1.4.2_02\lib\tools.jar
Boot & ext classpath =
C:\j2sdk1.4.2_02\jre\lib\rt.jar;C:\j2sdk1.4.2_02\jre\lib\i18n.jar;C:\j2sdk1.4.2_02\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_02\jre\lib\jsse.jar;C:\j2sdk1.4.2_02\jre\lib\jce.jar;C:\j2sdk1.4.2_02\jre\lib\charsets.jar;C:\j2sdk1.4.2_02\jre\classes;C:\j2sdk1.4.2_02\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_02\jre\lib\ext\jai_codec.jar;C:\j2sdk1.4.2_02\jre\lib\ext\jai_core.jar;C:\j2sdk1.4.2_02\jre\lib\ext\jhall.jar;C:\j2sdk1.4.2_02\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_02\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_02\jre\lib\ext\mlibwrapper_jai.jar;C:\j2sdk1.4.2_02\jre\lib\ext\sunjce_provider.jar
Dynamic classpath = C:\Program Files\NetBeans IDE
3.5.1\lib\core-windows.jar;C:\Program Files\NetBeans IDE
3.5.1\lib\core.jar;C:\Program Files\NetBeans IDE 3.5.1\lib\openide.jar
-------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org