[kaffe] new classpath import

M.Negovanovic milosn at bmf.bounceme.net
Wed Oct 15 00:49:02 PDT 2003

On Wed, Oct 15, 2003 at 02:56:58AM +0200, Dalibor Topic wrote:
> 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

OK patch is attached


* kaffe_orig/libraries/javalib/Makefile.am,
Removed java/beans/GenericBeanInfo.java entry from all these.

* kaffe/libraries/javalib/gnu/java/lang/ArrayHelper.java:
New class imported from GNU Classpath.

* kaffe/libraries/javalib/java/beans/GenericBeanInfo.java:
Removed leftover from Kaffe's original java.beans implementation.

* kaffe/libraries/javalib/java/beans/Introspector.java:
Substitute from GNU Classpath. Contains few bugfixes.


You have mentioned something about Bean.java breaking for u again
Dalibor. Well it seems to be because u only included part of my
patch to Bean.java (expected output part, line 'Method: public static
void Bean.main(java.lang.String[])' is not removed from the Bean.java).

I have removed this line because i believed that Classpath code is
'a priori' OK :), stupid i know now after playing with it for few days.
Anyway can someone verify this as a bug and not expected behaviour so i
can start looking for a fix :).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: beans_patch5.bz2
Type: application/octet-stream
Size: 8564 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20031015/26a49642/attachment-0002.obj 

More information about the kaffe mailing list