[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Pre-submit for serialization
From: |
Guilhem Lavaux |
Subject: |
[PATCH] Pre-submit for serialization |
Date: |
Wed, 26 Nov 2003 20:10:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 |
Hi,
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 <address@hidden>, Helmer Kraemer <address@hidden>
* 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);
}
/**
- [PATCH] Pre-submit for serialization,
Guilhem Lavaux <=