RFR: 8193037 package-info annotations are not reported when annotation processing is enabled

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Sep 13 22:49:05 UTC 2018


Looks OK to me.

-- Jon


On 9/13/18 3:38 PM, Liam Miller-Cushon wrote:
> Hello,
>
> Please consider this fix for JDK-8193037. Currently 
> JavacProcessingEnvironment incorrectly resets package-infos 
> corresponding to all package in the compilation (even if the 
> package-info was loaded from the classpath), rather than only 
> resetting package-infos that are being compiled from source as part of 
> that compilation.
>
> The fix uses the isPkgInfo helper already defined in 
> JavacProcessingEnvironment.
>
> webrev: http://cr.openjdk.java.net/~cushon/8193037/webrev.01/ 
> <http://cr.openjdk.java.net/%7Ecushon/8193037/webrev.01/>
> bug: https://bugs.openjdk.java.net/browse/JDK-8193037
>
> On Thu, Jan 25, 2018 at 10:27 AM Liam Miller-Cushon <cushon at google.com 
> <mailto:cushon at google.com>> wrote:
>
>     Friendly ping.
>
>     On Mon, Jan 8, 2018 at 11:42 AM, Liam Miller-Cushon
>     <cushon at google.com <mailto:cushon at google.com>> wrote:
>
>         Is anyone interested in sponsoring this patch?
>
>         On Tue, Dec 5, 2017 at 5:49 PM, Liam Miller-Cushon
>         <cushon at google.com <mailto:cushon at google.com>> wrote:
>
>             Hello,
>
>             Please review the following fix for JDK-8193037.
>
>             javac should only reset package-info symbols between
>             annotation processing rounds if
>             the package-info is being compiled from source. Previously
>             package-infos loaded from
>             the classpath were reset and not reinitialized, leading to
>             package annotations being
>             unavailable during later annotation processing rounds.
>
>             I included an additional test case to ensure that
>             package-infos are still reset when
>             necessary. Related discussion:
>             http://mail.openjdk.java.net/pipermail/compiler-dev/2017-December/011398.html
>
>             bug: https://bugs.openjdk.java.net/browse/JDK-8193037
>             webrev:
>             http://cr.openjdk.java.net/~cushon/8193037/webrev.00/
>             <http://cr.openjdk.java.net/%7Ecushon/8193037/webrev.00/>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180913/7cc9c10b/attachment.html>


More information about the compiler-dev mailing list