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

Strange code in JavacParser.java

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: