RFR: JDK-8207160: ClassReader::adjustMethodParams can potentially return null if the args list is empty

Liam Miller-Cushon cushon at google.com
Mon Sep 10 22:54:27 UTC 2018


Hi Vicente,

This looks good to me, for what that's worth.

A couple of nits:
* Consider doing the `args.isEmpty()` check earlier, at the beginning
of adjustMethodParams
or even before it's called. It might be slightly clearer, and it avoids
processing the empty list and creating an unnecessary ListBuffer.
* I thought more descriptive test names were now preferred over T8207160-style
names?

On Mon, Sep 10, 2018 at 2:13 PM Vicente Romero <vicente.romero at oracle.com>
wrote:

> ping
>
> On 08/31/2018 03:18 PM, Vicente Romero wrote:
> > Please review the fix for [1] at [2]. The bug was found by a user that
> > was compiling some classes with JDK11 while having some old libs built
> > with JDK6 in the class path. It seems like some versions of javac6
> > produced constructors for inner classes with no arguments. This is not
> > expected by newer versions of javac and it was producing a NPE. This
> > fix aims at making sure that ClassReader::adjustMethodParams wont
> > return a null even if the list of arguments passed to it is empty.
> >
> > TIA,
> > Vicente
> >
> > [1] https://bugs.openjdk.java.net/browse/JDK-8207160
> > [2] http://cr.openjdk.java.net/~vromero/8207160/webrev.00/jdk.dev.patch
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180910/72b92b07/attachment.html>


More information about the compiler-dev mailing list