> If something additional needs to be spec'ed then I suggest we add a > statement that the Bundle.loadClass method behaves like > ClassLoader.loadClass but listing all the possible errors probably is not > feasible (ClassLoader.loadClass does not list them either, so referencing > ClassLoader probably is not much help). We could call out > NoClassDefFoundError but there are others which Niclas mentioned earlier, > VerifierError, LinkageError etc. Do we really want to list each of these. > > I'm also do not think we should spec that Bundle.loadClass() must capture > loading Errors and figure out what went wrong and re-throw a > ClassNotFoundException. I think we need Bundle.loadClass to behave as much > like ClassLoader.loadClass as possible.
I would be fine with the statement that Bundle.loadClass behaves as much like ClassLoader.loadClass as possible. Thanks at any rate, at least it is clear now that the spec allows the way we implement it in Felix. regards, Karl > Tom > > > > "Niclas Hedhman" ---08/12/2008 01:17:05 AM---On Tue, Aug 12, 2008 at 1:44 > PM, Richard S. Hall <[EMAIL PROTECTED]> wrote: > Well, we are talkin > > > From: > "Niclas Hedhman" <[EMAIL PROTECTED]> > To: > "OSGi Developer Mail List" <[email protected]> > Date: > 08/12/2008 01:17 AM > Subject: > Re: [osgi-dev] Should Bundle.loadClass throw NoClassDefFoundError > ________________________________ > > > On Tue, Aug 12, 2008 at 1:44 PM, Richard S. Hall <[EMAIL PROTECTED]> > wrote: > >> Well, we are talking about ones you should expect to see...NCDFE are >> reasonably common when loading classes, especially for beginners in the >> OSGi >> environment. So, assuming that there is no value in trying to report such >> errors in a standard way, I can accept that it may not be convenient to >> list >> them and it is fair to simply say that this behaves like >> ClassLoader.loadClass(). > > Or perhaps, capture the NoClassDefFoundError, figure out what went > wrong, and throw a new ClassNotFoundException explaining the problem. > > > Cheers > Niclas > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > > > > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > -- Karl Pauls [EMAIL PROTECTED] _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
