Yes, please ask this on the osgi-dev mailing list or open an OSGi
specification bug at https://www.osgi.org/bugzilla/enter_bug.cgi.

I would not expect you to get Package objects for any packages for which a
class is not defined.  In most cases I don't think the VM class loaders do
that (boot, extension, application etc.).

Tom




                                                                       
  From:       "Jan Stette" <[EMAIL PROTECTED]>                      
                                                                       
  To:         "Equinox development mailing list" <[email protected]>
                                                                       
  Date:       06/02/2008 12:41 PM                                      
                                                                       
  Subject:    Re: [equinox-dev] Question regarding class loader and 
getPackages()
                                                                       





2008/6/2 BJ Hargrave <[EMAIL PROTECTED]>:


  > 1.  The call is not overridden in the Equinox classloader, so the
  > default implementation in java.lang.ClassLoader is used.  Hence,
  > only the bundle's own packages, and the system packages are returned.

  I don't think imported packages should be listed since they are imported
  from other bundles.

Does it matter which bundles the packages come from?  From the client of
the classloader, I would have thought this should be transparent, i.e. that
it returns all packages that are visible through this classloader.  From
the javadoc for java.lang.ClassLoader.getPackages():  "Returns all of the
Packages defined by this class loader and its ancestors".  In an OSGi
environment, wouldn't it be natural to include classloaders from bundles
depended on as well?

Anyway, is this a question better suited for osgi-dev instead of this list?

Regards,
Jan
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to