Skip to content
Permalink
Browse files
8066694: Strange code in JavacParser.java
Reviewed-by: vromero, iris
  • Loading branch information
turbanoff authored and JimLaskey committed Jun 5, 2021
1 parent 6c838c5 commit 36bff6f945a1eb6b1bbe21070a345df50095e918
Showing with 4 additions and 8 deletions.
  1. +4 −8 src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
@@ -2408,16 +2408,12 @@ JCExpression arrayCreatorRest(int newpos, JCExpression elemtype) {
List<JCAnnotation> maybeDimAnnos = typeAnnotationsOpt();
int pos = token.pos;
nextToken();
if (token.kind == RBRACKET) {
if (token.kind == RBRACKET) { // no dimension
elemtype = bracketsOptCont(elemtype, pos, maybeDimAnnos);
} else {
if (token.kind == RBRACKET) { // no dimension
elemtype = bracketsOptCont(elemtype, pos, maybeDimAnnos);
} else {
dimAnnotations.append(maybeDimAnnos);
dims.append(parseExpression());
accept(RBRACKET);
}
dimAnnotations.append(maybeDimAnnos);
dims.append(parseExpression());
accept(RBRACKET);
}
}

1 comment on commit 36bff6f

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 36bff6f Jun 5, 2021

Please sign in to comment.