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

javac crashing on a html-like file

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b43
    • Verification:
      Verified

      Backports

        Description

        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)

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: