[Patch] java.io.ObjectInputStream

Michael Koch konqueror@gmx.de
Sun Sep 26 06:08:00 GMT 2004


Hi list,


I just commited the attached patch to merge a fix by Case Marshal from
GNU classpath.


Michael


2004-09-24  Casey Marshall <csm@gnu.org>

	* java/io/ObjectInputStream.java (callReadMethod): re-throw
	`ClassNotFoundException'.

-------------- next part --------------
Index: java/io/ObjectInputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/ObjectInputStream.java,v
retrieving revision 1.34
diff -u -r1.34 ObjectInputStream.java
--- java/io/ObjectInputStream.java	24 Sep 2004 09:05:10 -0000	1.34
+++ java/io/ObjectInputStream.java	24 Sep 2004 09:30:51 -0000
@@ -1813,7 +1813,8 @@
   
   private native ClassLoader getCallersClassLoader();
 
-  private void callReadMethod (Method readObject, Class klass, Object obj) throws IOException
+  private void callReadMethod (Method readObject, Class klass, Object obj)
+    throws ClassNotFoundException, IOException
   {
     try
       {
@@ -1827,6 +1828,8 @@
 	  throw (RuntimeException) exception;
 	if (exception instanceof IOException)
 	  throw (IOException) exception;
+        if (exception instanceof ClassNotFoundException)
+          throw (ClassNotFoundException) exception;
 
 	throw new IOException("Exception thrown from readObject() on " +
 			       klass + ": " + exception.getClass().getName());


More information about the Java-patches mailing list