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
This commit is contained in:
parent
08012cdae4
commit
2dacb3e9ce
2 changed files with 7 additions and 6 deletions
|
@ -267,9 +267,7 @@ public class ObjectOutputStream extends OutputStream
|
|||
Class clazz = obj.getClass ();
|
||||
ObjectStreamClass osc = ObjectStreamClass.lookup (clazz);
|
||||
if (osc == null)
|
||||
throw new NotSerializableException ("The class "
|
||||
+ clazz.getName ()
|
||||
+ " is not Serializable");
|
||||
throw new NotSerializableException (clazz.getName ());
|
||||
|
||||
if (clazz.isArray ())
|
||||
{
|
||||
|
@ -334,9 +332,7 @@ public class ObjectOutputStream extends OutputStream
|
|||
break;
|
||||
}
|
||||
|
||||
throw new NotSerializableException ("Instances of the class "
|
||||
+ clazz.getName ()
|
||||
+ " are not Serializable");
|
||||
throw new NotSerializableException (clazz.getName ());
|
||||
} // end pseudo-loop
|
||||
}
|
||||
catch (IOException e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue