[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Better ObjectInputStream.readObject() exception
From: |
Mark Wielaard |
Subject: |
[cp-patches] FYI: Better ObjectInputStream.readObject() exception |
Date: |
Thu, 09 Sep 2004 20:19:44 +0200 |
Hi,
I finally applied the following readObject exception cleanup from Casey
which had been sitting in our patch tracker for more than 2 months.
2004-09-09 Casey Marshall <address@hidden>
* java/io/ObjectInputStream.java (callReadMethod): re-throw
`ClassNotFoundException'.
Cheers,
Mark
--- java/io/ObjectInputStream.java 22 Jul 2004 09:00:26 -0000 1.43
+++ java/io/ObjectInputStream.java 9 Sep 2004 18:16:38 -0000
@@ -1788,7 +1788,8 @@
*/
private static native ClassLoader currentClassLoader (SecurityManager sm);
- private void callReadMethod (Method readObject, Class klass, Object obj)
throws IOException
+ private void callReadMethod (Method readObject, Class klass, Object obj)
+ throws ClassNotFoundException, IOException
{
try
{
@@ -1802,6 +1803,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());
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: Better ObjectInputStream.readObject() exception,
Mark Wielaard <=