RFR: 8066694: Strange code in JavacParser.java
Jonathan Gibbons
jjg at openjdk.java.net
Mon Dec 21 17:15:57 UTC 2020
On Sun, 20 Dec 2020 13:13:43 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:
> This code was introduced in main repository under https://bugs.openjdk.java.net/browse/JDK-8006775
> I checked original commit in `type-annotations/langtools` repository: https://hg.openjdk.java.net/type-annotations/type-annotations/langtools/rev/71f35e4b93a5
> Looks like it's not a merge problem.
I suspect this was originally a merge issue, in the work leading up to the integration of the JSR308 work.
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java line 2397:
> 2395: elemtype = bracketsOptCont(elemtype, pos, maybeDimAnnos);
> 2396: } else {
> 2397: if (token.kind == RBRACKET) { // no dimension
I suggest keeping the comment, by moving it to line 2394
-------------
Changes requested by jjg (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1852
More information about the compiler-dev
mailing list