Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
       * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
       * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
       * java/lang/Math.java: New override file.
       * java/lang/Character.java: Merged from Classpath.
       (start, end): Now 'int's.
       (canonicalName): New field.
       (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
       (UnicodeBlock): Added argument.
       (of): New overload.
       (forName): New method.
       Updated unicode blocks.
       (sets): Updated.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r111942
This commit is contained in:
Mark Wielaard 2006-03-10 21:46:48 +00:00
parent 27079765d0
commit 8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions

View file

@ -46,6 +46,7 @@ import java.io.ObjectStreamClass;
import java.lang.reflect.Proxy;
import java.net.MalformedURLException;
import java.rmi.server.RMIClassLoader;
import java.util.ArrayList;
public class RMIObjectInputStream
extends ObjectInputStream {
@ -76,28 +77,51 @@ protected Object getAnnotation()
return readObject();
}
protected Class resolveProxyClass(String intfs[])
throws IOException, ClassNotFoundException
{
String annotation = (String)getAnnotation();
protected Class resolveProxyClass(String intfs[]) throws IOException,
ClassNotFoundException
{
String annotation = (String) getAnnotation();
Class clss[] = new Class[intfs.length];
if(annotation == null)
clss[0] = RMIClassLoader.loadClass(intfs[0]);
else
clss[0] = RMIClassLoader.loadClass(annotation, intfs[0]);
//assume all interfaces can be loaded by the same classloader
ClassLoader loader = clss[0].getClassLoader();
for (int i = 0; i < intfs.length; i++)
clss[i] = Class.forName(intfs[i], false, loader);
try {
return Proxy.getProxyClass(loader, clss);
} catch (IllegalArgumentException e) {
throw new ClassNotFoundException(null, e);
}
}
{
if (annotation == null)
clss[i] = RMIClassLoader.loadClass(intfs[i]);
else
clss[i] = RMIClassLoader.loadClass(annotation, intfs[i]);
}
ClassLoader loader;
if (clss.length > 0)
{
// Chain all class loaders (they may differ).
ArrayList loaders = new ArrayList(intfs.length);
ClassLoader cx;
for (int i = 0; i < clss.length; i++)
{
cx = clss[i].getClassLoader();
if (!loaders.contains(cx))
{
loaders.add(0, cx);
}
}
loader = new CombinedClassLoader(loaders);
}
else
loader = ClassLoader.getSystemClassLoader();
try
{
return Proxy.getProxyClass(loader, clss);
}
catch (IllegalArgumentException e)
{
throw new ClassNotFoundException(null, e);
}
}
protected Object readValue(Class valueClass) throws IOException, ClassNotFoundException {
if(valueClass.isPrimitive()){