Hi, This small patch helps a lot when trying to figure out where some non-serializable object comes from. It prints the class that contains the field that holds the reference to the non-serializable object:
2005-10-02 Mark Wielaard <[EMAIL PROTECTED]> * java/io/ObjectOutputStream.java (writeObject): Add defining class to NotSerializableException. Committed, Mark diff -u -r1.59 ObjectOutputStream.java --- java/io/ObjectOutputStream.java 9 Sep 2005 12:12:03 -0000 1.59 +++ java/io/ObjectOutputStream.java 2 Oct 2005 23:35:30 -0000 @@ -361,7 +361,9 @@ break; } - throw new NotSerializableException(clazz.getName ()); + throw new NotSerializableException(clazz.getName() + + " in " + + currentObject.getClass()); } // end pseudo-loop } catch (ObjectStreamException ose)
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches