[jdk21u-dev] RFR: 8337795: Type annotation attached to incorrect type during class reading [v3]
Liam Miller-Cushon
cushon at openjdk.org
Wed Apr 16 16:28:56 UTC 2025
On Thu, 9 Jan 2025 15:50:13 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
>> This is a backport of [JDK-8337795](https://bugs.openjdk.org/browse/JDK-8337795), which is a follow-up to [JDK-8225377](https://bugs.openjdk.org/browse/JDK-8225377).
>
> Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>
> Backport 8d0831478338e9b084b2c47f46eba9faae3a5eb6
I merged in the latest changes and resolved the merge conflict with https://github.com/openjdk/jdk21u-dev/commit/421654630dfcc4b697fdd61c8a46c1d2f899d8fb
<details>
<summary>I double-checked that the changed lines in the diff are still the same as the change being backported (the changes are in some context lines).</summary>
$ diff <(git diff origin/master) <(cd ~/src/jdk; git diff 8d0831478338e9b084b2c47f46eba9faae3a5eb6^ 8d0831478338e9b084b2c47f46eba9faae3a5eb6)
2c2
< index 4dac48d9778..ef4985cad7e 100644
---
> index dba5fb6a197..fcc1efda8dc 100644
5c5
< @@ -36,9 +36,9 @@ import java.util.HashMap;
---
> @@ -36,9 +36,9 @@
16c16
< @@ -2412,13 +2412,8 @@ public class ClassReader {
---
> @@ -2461,13 +2461,8 @@ private Type addTypeAnnotations(Type type, Predicate<TypeAnnotationPosition> fil
31c31
< @@ -2446,120 +2441,102 @@ public class ClassReader {
---
> @@ -2495,120 +2490,102 @@ private static Predicate<TypeAnnotationPosition> classExtends(int index) {
223c223
< index 2a9d2c09497..51218ca3b6b 100644
---
> index d45edc8e3d6..acd91eac8c7 100644
226,228c226,228
< @@ -586,4 +586,8 @@ public class BasicAnnoTests extends JavacTestingAbstractProcessor {
< @Test(posn=4, annoType = TB.class, expect = "100")
< class Inner100<T extends Inner100<@TB(100) T>> {
---
> @@ -717,4 +717,8 @@ private class GenericNested<Y> {
> GenericNested(@TA(120) GenericInner120<X> GenericInner120.this) {}
> }
</details>
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1252#issuecomment-2810101733
More information about the jdk-updates-dev
mailing list