See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=76455 for a
discussion on this behavior.

Tom




                                                                       
  From:       David Shepherdson <[EMAIL PROTECTED]>
                                                                       
  To:         equinox-dev@eclipse.org                                  
                                                                       
  Date:       02/15/2008 04:32 AM                                      
                                                                       
  Subject:    [equinox-dev] Bug in BundleLoader's findClass(String, boolean)?
                                                                       





Hello,

I've come across what appears to be a bug in the findClass(String,
boolean) method in
org.eclipse.osgi.framework.internal.core.BundleLoader. It doesn't seem
to cope with arrays of basic Java types. For example, if I call

     findClass(String[].class.getName())

...it throws a ClassNotFoundException.

 From my reading of the OSGi spec, it sounds like it should be
delegating to the parent classloader in such a case. However, looking
at the code, the actual test it does is

     name.startsWith(JAVA_PACKAGE)

...which in the case of an array will fail (the name of String[].class
is '[Ljava.lang.String;', for example).

Should this code be changed so that, rather than just checking whether
the class's name starts with 'java.', it checks whether the underlying
type is a 'java.*' type?

Thank you,

David Shepherdson
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to