Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8066694: Strange code in JavacParser.java #1852

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -2391,16 +2391,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
turbanoff marked this conversation as resolved.
Show resolved Hide resolved
elemtype = bracketsOptCont(elemtype, pos, maybeDimAnnos);
} else {
dimAnnotations.append(maybeDimAnnos);
dims.append(parseExpression());
accept(RBRACKET);
}
dimAnnotations.append(maybeDimAnnos);
dims.append(parseExpression());
accept(RBRACKET);
}
}

Expand Down