Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8066694

Strange code in JavacParser.java

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 17
    • 9
    • tools
    • b26

      Parser.java contains the following at line 2206:

      {code}
      if (token.kind == RBRACKET) {
          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);
          }
      }
      {code}

      It seems that the inner if is always false.

            jlahoda Jan Lahoda
            emc Eric Mccorkle
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: