incubator-yoko-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Kühne (JIRA) <>
Subject [jira] Commented: (YOKO-258) Bad reference to ClassLoader.classes in org.apache.yoko.rmi.util.ClassLoaderLocal static initializer
Date Fri, 29 Dec 2006 23:16:27 GMT
    [ ] 
Lars Kühne commented on YOKO-258:

The only actual *use* of the classes Vector seems to be in ClassLoaderLocal.getLoaderLocalMap():

            Vector v = getClassesVector(cl);

            Object o = v.get(0);
            if (!(o instanceof ClassLocalMap)) {
                map = new ClassLocalMap();
                v.set(0, map);
            } else {
                map = (ClassLocalMap) o;

In other words, this code implements a mapping from the current thread's context classloader
to some ClassLocalMap object. It is not clear to me why that mapping has to be stored in the
ClassLoader's classes vector. Shouldn't it be stored somewhere in the ClassLoaderLocal class?

> Bad reference to ClassLoader.classes in org.apache.yoko.rmi.util.ClassLoaderLocal static
> ----------------------------------------------------------------------------------------------------
>                 Key: YOKO-258
>                 URL:
>             Project: Yoko - CORBA Server
>          Issue Type: Bug
>            Reporter: Vasily Zakharov
> org.apache.yoko.rmi.util.ClassLoaderLocal class contains the following line in its static
> 	classes_vector = ClassLoader.class.getDeclaredField("classes");
> This line references the 'classes' field in class java.lang.ClassLoader, and that field
is not documented by API JavaDoc and may be absent in particular Java VM/classlib implementations,
for example it's absent in Apache Harmony.
> As the result of this issue, the classes org.apache.yoko.rmi.util.ClassLoaderLocal and
org.apache.yoko.rmi.impl.PortableRemoteObjectExtImpl fail to load with NoSuchFieldException,
on those implementations.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message