You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Rice Yeh <ri...@netscape.net> on 2002/05/01 14:25:25 UTC
ClassCastException raised in newFactory() method when starting from JUnit test
Hi all,
Just wonder why ClassCastException is raised at line 496 of LogFactory in newFactory() method when running as a JUnit test? I found this problem when running RequiredNameTest in commons-validator. When casting a class to some superclass, does classloader from other thread form a namespace and so can NOT cast it? Java language spec seems not regulate this. I have proven this with a small program.
Attached are JUnit test files I use to study this problem.
Regards,
Rice
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/