[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: RFR(13): JDK-8217047: Provide a way to inject missing parameter names
From:       Jan Lahoda <jan.lahoda () oracle ! com>
Date:       2019-02-13 14:24:00
Message-ID: 5C642880.9030609 () oracle ! com
[Download RAW message or body]

Hi,

Based on feedback, I've updated the javadoc. Also, when 
ParameterNameProvider.getParameterName returns null, the javac's default 
name will be returned from VariableElement.getSimpleName(), so I've made 
this explicit in the javadoc and added a test for that.

Updated webrev: http://cr.openjdk.java.net/~jlahoda/8217047/webrev.02/
Updated specdiff:
http://cr.openjdk.java.net/~jlahoda/8217047/specdiff.02/overview-summary.html

How does this look?

Thanks,
     Jan

On 21.1.2019 13:32, Jan Lahoda wrote:
> Hi,
>
> When a type is load from a classfile, and some or all of its methods
> have neither the MethodParameters or LocalVariableTable attributes, then
> the parameters of the methods have an artificial synthesized name, which
> is visible through VariableElement.getSimpleName().
>
> The proposal here is to allow to plug in an external provider that could
> provide more user-friendly names lazily/on demand. These could originate
> e.g. in adjacent sources.
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8217437
> Webrev: http://cr.openjdk.java.net/~jlahoda/8217047/webrev.01/
> Specdiff:
> http://cr.openjdk.java.net/~jlahoda/8217047/specdiff.01/overview-summary.html
>
>
> CSR: https://bugs.openjdk.java.net/browse/JDK-8217437
>
> What do you think?
>
> Thanks,
>      Jan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic