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

javac crashing on a html-like file

XMLWordPrintable

    • b43
    • Verified

        Consider this file:
        ---
        <
        ---

        And compile using a recent JDK:
        $ javac -XDdev html.java
        html.java:1: error: class, interface, or enum expected
        <
        ^
        1 error
        An exception has occurred in the compiler (1.9.0-internal). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
        java.lang.AssertionError
                at com.sun.tools.javac.util.Assert.error(Assert.java:125)
                at com.sun.tools.javac.util.Assert.check(Assert.java:44)
                at com.sun.tools.javac.parser.JavacParser.reportSyntaxError(JavacParser.java:451)
                at com.sun.tools.javac.parser.JavacParser.syntaxError(JavacParser.java:413)
                at com.sun.tools.javac.parser.JavacParser.classOrInterfaceOrEnumDeclaration(JavacParser.java:3178)
                at com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3153)
                at com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3094)
                at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:595)
                at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:632)
                at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:920)
                at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:833)
                at com.sun.tools.javac.main.Main.compile(Main.java:249)
                at com.sun.tools.javac.main.Main.compile(Main.java:140)
                at com.sun.tools.javac.Main.compile(Main.java:56)
                at com.sun.tools.javac.Main.main(Main.java:42)

              jlahoda Jan Lahoda
              jlahoda Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: