Re: [OJB-developers] bug in ClassDescriptor.getDynamicProxyClass
Brought to you by:
thma
From: Jakob B. <jbr...@ho...> - 2002-06-07 13:48:24
|
hi georg, i commited your fix for ClassDescriptor. if you have larger fixes or fixes for multiple classes, please send me the complete files. thanks und servus jakob (mit k) ----- Original Message ----- From: "Georg Schneider" <ge...@me...> To: <obj...@li...> Cc: <ja...@sc...>; "Mahler Thomas" <tho...@it...> Sent: Friday, June 07, 2002 1:54 PM Subject: [OJB-developers] bug in ClassDescriptor.getDynamicProxyClass > Hi Thomas and Jacob, > > First of all sorry for always bugging you two to put patches in, but I > simply don't know who is responsible for what part. Is there a list of who > maintains what, if not it would be a good idea to make one :-). > > The bug: getDynamicProxyClass creates a proxy class implementing all > interfaces of the original class. In order to do this it first calls > getInterfaces() on the class to be proxied and then iterates over all the > superclasses to do the same. > This works fine if the original class is a real class, which is almost > always the case. > Unfortunately when using a reference-proxy the item class can be an > interface itself and when getInterfaces() is called on an interface it > returns only the extending interfaces, not the interface itself. > > Fix: Put the following lines in the method getDynamicProxyClass() in > ClassDescriptor > > Class[] interfaces = clazz.getInterfaces(); > ==>add from here on > if (clazz.isInterface()) > { > Class[] tempInterfaces = new Class[interfaces.length + 1]; > tempInterfaces[0] = clazz; > > System.arraycopy(interfaces,0,tempInterfaces,1,interfaces.length); > interfaces = tempInterfaces; > } > > > Cheers > > Georg > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |