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

Antlr-Javac, miscellaneous bugs discovered

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      1) deprecated inside comment before import or package deprecates the construct below it.
      /** @deprecated **/
      import test;
      class T{}

      class T will be deprecated mistakingly.

      2) for this input,
      @SuppressWarnings("fallthrough") class Parser {}
      the position of JCModifiers is set to the position of 'class'.
      it should be the position of the '@' sign.

      3) <Integer>super(x)
      for this input, indentifer super's position is set to the position of '<', shouldn't be like this.

      4) There are several places where code are like
      F.at(pos).Wildcard(t, type());
      which will generate tree node with wrong position.

      5) com.sun.tools.javac.parser.Parser.typeArguments() is wrong for <a extends C<b>>
      end position is not right for c<b>, it's set to the position of b, but should set to the last '>' of 'C<b>'

      6)the positions of complex binary position isn't right, for expression like
      c == 0 && e == 0 && f == 0
      the postion of the 'e == 0 && f == 0' part is set to the position of the last '==', but should be '&&'.

      7) string isn't folded all the time. maybe not a bug.
      String s = "a"+"b" is folded by parser to s = "ab", but if(s!= "a"+"b") is not foled.

        Attachments

          Activity

            People

            • Assignee:
              jjg Jonathan Gibbons
              Reporter:
              yangjiang Yang Jiang (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: