Commit 2dacb3e9 by Warren Levy Committed by Warren Levy

ObjectOutputStream.java (writeObject): Per spec, call NotSerializableException…

ObjectOutputStream.java (writeObject): Per spec, call NotSerializableException with just the class name.

	* java/io/ObjectOutputStream.java (writeObject): Per spec, call
	NotSerializableException with just the class name.

From-SVN: r35325
parent 08012cda
2000-07-28 Warren Levy <warrenl@cygnus.com>
* java/io/ObjectOutputStream.java (writeObject): Per spec, call
NotSerializableException with just the class name.
2000-07-26 Andrew Haley <aph@cygnus.com> 2000-07-26 Andrew Haley <aph@cygnus.com>
* interpret.cc (continue1): Insert missing break into switch. * interpret.cc (continue1): Insert missing break into switch.
......
...@@ -267,9 +267,7 @@ public class ObjectOutputStream extends OutputStream ...@@ -267,9 +267,7 @@ public class ObjectOutputStream extends OutputStream
Class clazz = obj.getClass (); Class clazz = obj.getClass ();
ObjectStreamClass osc = ObjectStreamClass.lookup (clazz); ObjectStreamClass osc = ObjectStreamClass.lookup (clazz);
if (osc == null) if (osc == null)
throw new NotSerializableException ("The class " throw new NotSerializableException (clazz.getName ());
+ clazz.getName ()
+ " is not Serializable");
if (clazz.isArray ()) if (clazz.isArray ())
{ {
...@@ -334,9 +332,7 @@ public class ObjectOutputStream extends OutputStream ...@@ -334,9 +332,7 @@ public class ObjectOutputStream extends OutputStream
break; break;
} }
throw new NotSerializableException ("Instances of the class " throw new NotSerializableException (clazz.getName ());
+ clazz.getName ()
+ " are not Serializable");
} // end pseudo-loop } // end pseudo-loop
} }
catch (IOException e) catch (IOException e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment