I think I will have to begin the split of the serialization patch at a time or another. I'm beginning with this really simple patch for TypeSignature.
It is needed so class can resolved by name using a specific class loader and not using a default class loader as it was the case with the previous API.
This change was originally submitted/suggested by Helmer Kraemer to fix something in the modified serializer.
Cheers, Guilhem.
ChangeLog:
2003-11-26 Guilhem Lavaux <[EMAIL PROTECTED]>, Helmer Kraemer <[EMAIL PROTECTED]>
* gnu/java/lang/reflect/TypeSignature.java
(getClassForEncoding) Splitted the method so we can specify an explicit boot loader.
Index: gnu/java/lang/reflect/TypeSignature.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/lang/reflect/TypeSignature.java,v
retrieving revision 1.10
diff -u -r1.10 TypeSignature.java
--- gnu/java/lang/reflect/TypeSignature.java 22 Mar 2002 21:25:20 -0000 1.10
+++ gnu/java/lang/reflect/TypeSignature.java 16 Nov 2003 16:27:05 -0000
@@ -150,6 +150,12 @@
public static Class getClassForEncoding(String type_code, boolean descriptor)
throws ClassNotFoundException
{
+ return getClassForEncoding(type_code, descriptor, null);
+ }
+
+ public static Class getClassForEncoding(String type_code, boolean descriptor,
ClassLoader loader)
+ throws ClassNotFoundException
+ {
if (descriptor)
{
switch (type_code.charAt(0))
@@ -181,7 +187,7 @@
case '[':
}
}
- return Class.forName(type_code.replace('/', '.'));
+ return Class.forName(type_code.replace('/', '.'), true, loader);
}
/**
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

