RFR [15] 8248233: Avoid superfluous Class::isRecord invocations during deserialization

Chris Hegarty chris.hegarty at oracle.com
Wed Jun 24 16:53:39 UTC 2020


> On 24 Jun 2020, at 17:15, Claes Redestad <claes.redestad at oracle.com> wrote:
> 
> ...
> It seems ObjectInputStream#isRecord(Class) is now unused. No need for
> a new webrev if you choose to remove it.

Good catch, now removed.

> On 24 Jun 2020, at 17:25, Peter Levart <peter.levart at gmail.com> wrote:
> 
> Hi Chris,
> 
> The patch looks good.
> 
> Before the patch it made sense to have if (cl != null) in line 750 in ObjectStreamClass, but now nothing in the if block depends on cl, so you could use if (osc != null) instead. It is true that:
> 
> (cl != null) == (osc != null) 
> 
> always holds there, but reading the code is easier that way, don't you think? Maybe you could even consider merging the content of this if block into the similar if block that starts in line 771?
> 
Yes, good idea. Done.

Updated webrev:
  https://cr.openjdk.java.net/~chegar/8248233/webrev.01

-Chris.


More information about the core-libs-dev mailing list