RFR: [8039396] NPE when writing a class descriptor object to a custom ObjectOutputStream

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 15 08:56:21 UTC 2014


On 11/04/2014 09:01, Ivan Gerasimov wrote:
> Hello everybody!
>
> ObjectStreamClass#forClass() function is allowed to return null, if 
> the local VM does not have the corresponding local class.
> Because of that, NPE can be encountered during serialization through a 
> subclass of ObjectOutputStream.
>
> Would you please help review the fix?
>
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8039396
> WEBREV: http://cr.openjdk.java.net/~igerasim/8039396/0/webrev/
The fix looks okay to me, a bit of a corner case but okay.

The test looks useful. A minor suggestion is to shorten the lines a bit 
to make future side-by-side reviews easier.

-Alan.



More information about the core-libs-dev mailing list