RFR: 8350212: Track source end positions of declarations that support @SuppressWarnings [v8]
Archie Cobbs
acobbs at openjdk.org
Fri May 30 20:14:32 UTC 2025
On Fri, 30 May 2025 10:37:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update EndPosTable.replaceTree() to handle a new node equal to null.
>
> test/langtools/tools/javac/parser/extend/TrialParser.java line 142:
>
>> 140: }
>> 141: toplevel.lineMap = S.getLineMap();
>> 142: this.endPosTable.setParser(null); // remove reference to parser
>
> Not sure about these changes -- e.g. what was the test trying to do in the first place?
This line to be removed simply because `EndPosTable` no longer has this back-reference to the parser. This file is used in a test for [JDK-8067384](https://bugs.openjdk.org/browse/JDK-8067384) which verifies that it's possible to subclass `JavacParser`.
My assumption was that this line was just a cut & paste copy of [this line](https://github.com/openjdk/jdk/blob/94039e22bbe943888e858d8ae278145e2668526a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java#L4144) and has no significance to the actual test.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23669#discussion_r2116571804
More information about the compiler-dev
mailing list