[kaffe] new classpath import
Dalibor Topic
robilad@kaffe.org
Tue Oct 14 17:37:03 2003
Hi Milos,
M.Negovanovic wrote:
> Ive looked at the LoaderTest breakage caused by this patch that Dalibor
> reported to me:
Thanks! sorry for not responding quicker, but we had this LinuxKongress
Classpath BoF here today ...
> 1) breakage is caused by the differences in java.beans.Introspector
> implementations in Kaffe and Classpath.
>
> Kaffe's current Introspector loads BeanInfo with the ClassLoader that
> was used to load the Bean class itself , while on the other side
> ClassPath's Introspector uses default(?) ClassLoader to load BeanInfo.
>
> 2) test breakage is easely fixable with few simple changes in Classpath's
> Introspector (i have it fixed in local tree)
>
> What is the "right" way to fix this. Change Classpath's Introspector to
> resemble Kaffe's original one ... or change the LoaderTest?
I think the right way to fix it is loading BeanInfo with the ClassLoader
that was used to load the Bean class itself, since the Bean class may
not be reachable through the default (i.e. the class loader of the
method calling Class.forName(String)) class loader, so it should be
loaded using the class loader that was used to load the bean class.
Thanks for spotting it, I'm looking forward to apply your patch. BTw,
could you please send a patch with the fix to the GNU Classpath project
as well, along with the fix to IndexedPropertyDescriptor? I'm sure they
would love to have those bug fixes as well.
cheers,
dalibor topic