Imported Classpath 0.18.
* sources.am, Makefile.in: Updated. * Makefile.am (nat_source_files): Removed natProxy.cc. * java/lang/reflect/natProxy.cc: Removed. * gnu/classpath/jdwp/VMFrame.java, gnu/classpath/jdwp/VMIdManager.java, gnu/classpath/jdwp/VMVirtualMachine.java, java/lang/reflect/VMProxy.java: New files. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC list. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/net/DefaultContentHandlerFactory.java (getContent): Remove ClasspathToolkit references. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/awt/xlib/XCanvasPeer.java: Add new peer methods. * gnu/awt/xlib/XFramePeer.java: Likewise. * gnu/awt/xlib/XGraphicsConfiguration.java: Likewise. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c. Add classpath/native/jawt/jawt.c. * Makefile.in: Regenerate. * jawt.c: Remove file. * include/Makefile.am (tool_include__HEADERS): Remove jawt.h and jawt_md.h. Add ../classpath/include/jawt.h and ../classpath/include/jawt_md.h. * include/Makefile.in: Regenerate. * include/jawt.h: Regenerate. * include/jawt_md.h: Regenerate. From-SVN: r104586
This commit is contained in:
parent
9b044d1951
commit
1ea63ef8be
544 changed files with 34724 additions and 14512 deletions
|
@ -501,8 +501,7 @@ public class ObjectInputStream extends InputStream
|
|||
flags, fields);
|
||||
assignNewHandle(osc);
|
||||
|
||||
if (callersClassLoader == null)
|
||||
callersClassLoader = currentLoader();
|
||||
ClassLoader callersClassLoader = currentLoader();
|
||||
|
||||
for (int i = 0; i < field_count; i++)
|
||||
{
|
||||
|
@ -528,36 +527,7 @@ public class ObjectInputStream extends InputStream
|
|||
|
||||
/* Now that fields have been read we may resolve the class
|
||||
* (and read annotation if needed). */
|
||||
Class clazz;
|
||||
try
|
||||
{
|
||||
clazz = resolveClass(osc);
|
||||
}
|
||||
catch (ClassNotFoundException cnfe)
|
||||
{
|
||||
// Maybe it was an primitive class?
|
||||
if (name.equals("void"))
|
||||
clazz = Void.TYPE;
|
||||
else if (name.equals("boolean"))
|
||||
clazz = Boolean.TYPE;
|
||||
else if (name.equals("byte"))
|
||||
clazz = Byte.TYPE;
|
||||
else if (name.equals("short"))
|
||||
clazz = Short.TYPE;
|
||||
else if (name.equals("char"))
|
||||
clazz = Character.TYPE;
|
||||
else if (name.equals("int"))
|
||||
clazz = Integer.TYPE;
|
||||
else if (name.equals("long"))
|
||||
clazz = Long.TYPE;
|
||||
else if (name.equals("float"))
|
||||
clazz = Float.TYPE;
|
||||
else if (name.equals("double"))
|
||||
clazz = Double.TYPE;
|
||||
else
|
||||
throw cnfe;
|
||||
}
|
||||
|
||||
Class clazz = resolveClass(osc);
|
||||
boolean oldmode = setBlockDataMode(true);
|
||||
osc.setClass(clazz, lookupClass(clazz.getSuperclass()));
|
||||
classLookupTable.put(clazz, osc);
|
||||
|
@ -770,16 +740,34 @@ public class ObjectInputStream extends InputStream
|
|||
protected Class resolveClass(ObjectStreamClass osc)
|
||||
throws ClassNotFoundException, IOException
|
||||
{
|
||||
if (callersClassLoader == null)
|
||||
String name = osc.getName();
|
||||
try
|
||||
{
|
||||
callersClassLoader = currentLoader ();
|
||||
if (DEBUG && dump)
|
||||
{
|
||||
dumpElementln ("CallersClassLoader = " + callersClassLoader);
|
||||
}
|
||||
return Class.forName(name, true, currentLoader());
|
||||
}
|
||||
catch(ClassNotFoundException x)
|
||||
{
|
||||
if (name.equals("void"))
|
||||
return Void.TYPE;
|
||||
else if (name.equals("boolean"))
|
||||
return Boolean.TYPE;
|
||||
else if (name.equals("byte"))
|
||||
return Byte.TYPE;
|
||||
else if (name.equals("char"))
|
||||
return Character.TYPE;
|
||||
else if (name.equals("short"))
|
||||
return Short.TYPE;
|
||||
else if (name.equals("int"))
|
||||
return Integer.TYPE;
|
||||
else if (name.equals("long"))
|
||||
return Long.TYPE;
|
||||
else if (name.equals("float"))
|
||||
return Float.TYPE;
|
||||
else if (name.equals("double"))
|
||||
return Double.TYPE;
|
||||
else
|
||||
throw x;
|
||||
}
|
||||
|
||||
return Class.forName(osc.getName(), true, callersClassLoader);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -957,19 +945,13 @@ public class ObjectInputStream extends InputStream
|
|||
{
|
||||
if (this.readDataFromBlock)
|
||||
{
|
||||
if (this.blockDataPosition + length > this.blockDataBytes)
|
||||
{
|
||||
int remain = this.blockDataBytes - this.blockDataPosition;
|
||||
if (remain != 0)
|
||||
{
|
||||
System.arraycopy(this.blockData, this.blockDataPosition,
|
||||
data, offset, remain);
|
||||
offset += remain;
|
||||
length -= remain;
|
||||
}
|
||||
readNextBlock ();
|
||||
}
|
||||
|
||||
int remain = this.blockDataBytes - this.blockDataPosition;
|
||||
if (remain == 0)
|
||||
{
|
||||
readNextBlock();
|
||||
remain = this.blockDataBytes - this.blockDataPosition;
|
||||
}
|
||||
length = Math.min(length, remain);
|
||||
System.arraycopy(this.blockData, this.blockDataPosition,
|
||||
data, offset, length);
|
||||
this.blockDataPosition += length;
|
||||
|
@ -1281,7 +1263,7 @@ public class ObjectInputStream extends InputStream
|
|||
}
|
||||
catch (NoSuchFieldException e)
|
||||
{
|
||||
throw new IllegalArgumentException(e.getMessage());
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1426,6 +1408,7 @@ public class ObjectInputStream extends InputStream
|
|||
ObjectStreamField field = clazz.getField(name);
|
||||
boolean illegal = false;
|
||||
|
||||
// XXX This code is horrible and needs to be rewritten!
|
||||
try
|
||||
{
|
||||
try
|
||||
|
@ -1485,7 +1468,7 @@ public class ObjectInputStream extends InputStream
|
|||
catch (NoSuchFieldException e)
|
||||
{
|
||||
if (field == null)
|
||||
throw new IllegalArgumentException(e.getMessage());
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1829,8 +1812,8 @@ public class ObjectInputStream extends InputStream
|
|||
}
|
||||
catch (InstantiationException e)
|
||||
{
|
||||
throw new ClassNotFoundException
|
||||
("Instance of " + real_class + " could not be created");
|
||||
throw (ClassNotFoundException) new ClassNotFoundException
|
||||
("Instance of " + real_class + " could not be created").initCause(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1871,13 +1854,13 @@ public class ObjectInputStream extends InputStream
|
|||
if (exception instanceof ClassNotFoundException)
|
||||
throw (ClassNotFoundException) exception;
|
||||
|
||||
throw new IOException("Exception thrown from readObject() on " +
|
||||
klass + ": " + exception.getClass().getName());
|
||||
throw (IOException) new IOException(
|
||||
"Exception thrown from readObject() on " + klass).initCause(x);
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
throw new IOException("Failure invoking readObject() on " +
|
||||
klass + ": " + x.getClass().getName());
|
||||
throw (IOException) new IOException(
|
||||
"Failure invoking readObject() on " + klass).initCause(x);
|
||||
}
|
||||
|
||||
// Invalidate fields which has been read through readFields.
|
||||
|
@ -1905,7 +1888,6 @@ public class ObjectInputStream extends InputStream
|
|||
private Hashtable classLookupTable;
|
||||
private GetField prereadFields;
|
||||
|
||||
private ClassLoader callersClassLoader;
|
||||
private static boolean dump;
|
||||
|
||||
// The nesting depth for debugging output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue