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

javac -Xprint returns IndexOutOfBoundsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 6u18, 7
    • tools
    • b89
    • generic
    • generic
    • Verified

        javac -Xprint returns IndexOutOfBoundsException on a following trivial testcase:

        > cat NotFullOfAnnotations.java

        enum NotFullOfAnnotations {}

        > javac -J-showversion -Xprint NotFullOfAnnotations.java

        java version "1.6.0_18"
        Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
        Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)


        An annotation processor threw an uncaught exception.
        Consult the following stack trace for details.
        java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at com.sun.tools.javac.processing.PrintingProcessor$PrintingElementVisitor.visitType(PrintingProcessor.java:231)
        at com.sun.tools.javac.processing.PrintingProcessor$PrintingElementVisitor.visitType(PrintingProcessor.java:72)
        at com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:827)
        at javax.lang.model.util.AbstractElementVisitor6.visit(AbstractElementVisitor6.java:85)
        at com.sun.tools.javac.processing.PrintingProcessor.print(PrintingProcessor.java:65)
        at com.sun.tools.javac.processing.PrintingProcessor.process(PrintingProcessor.java:57)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:624)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:553)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:698)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
        at com.sun.tools.javac.main.Main.compile(Main.java:353)
        at com.sun.tools.javac.main.Main.compile(Main.java:279)
        at com.sun.tools.javac.main.Main.compile(Main.java:270)
        at com.sun.tools.javac.Main.compile(Main.java:69)
        at com.sun.tools.javac.Main.main(Main.java:54)

              darcy Joe Darcy
              ikrylov Ivan Krylov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: