[jdk11u-dev] Integrated: 8236210: javac generates wrong annotation for fields generated from record components

Liam Miller-Cushon cushon at openjdk.java.net
Tue Jan 25 22:10:35 UTC 2022


On Mon, 17 Jan 2022 22:26:33 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

> This is a backport of [JDK-8236210: javac generates wrong annotation for fields generated from record components](https://bugs.openjdk.java.net/browse/JDK-8236210)
> 
> This is a partial backport.
> 
> * The focus of JDK-8236210 was a bug with records and most of the diff was to logic that was added to deal with records. However the patch also included a fix to the logic for checking annotation applicability in `Check.annotationApplicable` that fixes a bug with annotations on `var`, so I backported the part that is relevant to Java 11.
> * I added a test for the issue specific to `var`, since the original test is for records and cannot be backported.
> 
> Testing: x86 build, affected tests, tier1

This pull request has now been integrated.

Changeset: e279d078
Author:    Liam Miller-Cushon <cushon at openjdk.org>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.java.net/jdk11u-dev/commit/e279d07852c2d9e620cb46b41e421f2b8623d4b9
Stats:     58 lines in 3 files changed: 42 ins; 0 del; 16 mod

8236210: javac generates wrong annotation for fields generated from record components

Reviewed-by: phh
Backport-of: 0f98701e8766b88a932e29ed2ba7dbd921e49786

-------------

PR: https://git.openjdk.java.net/jdk11u-dev/pull/771


More information about the jdk-updates-dev mailing list