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

JShell crashes when typing text block

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b29

      Backports

        Description

        Reported here:
        https://mail.openjdk.java.net/pipermail/kulla-dev/2020-June/002523.html

        JShell crashes when typing a text block:
        $ jshell
        | Welcome to JShell -- Version 15-internal
        | For an introduction type: /help intro

        jshell> """
        Exception in thread "main" java.lang.IllegalArgumentException
                at jdk.compiler/com.sun.tools.javac.util.JCDiagnostic.<init>(JCDiagnostic.java:600)
                at jdk.compiler/com.sun.tools.javac.util.JCDiagnostic$Factory.create(JCDiagnostic.java:283)
                at jdk.compiler/com.sun.tools.javac.util.JCDiagnostic$Factory.error(JCDiagnostic.java:111)
                at jdk.compiler/com.sun.tools.javac.util.AbstractLog.error(AbstractLog.java:145)
                at jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.lexError(JavaTokenizer.java:163)
                at jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.scanString(JavaTokenizer.java:449)
                at jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.readToken(JavaTokenizer.java:936)
                at jdk.compiler/com.sun.tools.javac.parser.Scanner.nextToken(Scanner.java:115)
                at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.countPendingOpenBraces(ConsoleIOContext.java:988)
                at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.lambda$new$3(ConsoleIOContext.java:182)
                at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.acceptLine(LineReaderImpl.java:2983)
                at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl$1.apply(LineReaderImpl.java:3797)
                at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:665)
                at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:454)
                at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.readLine(ConsoleIOContext.java:229)
                at jdk.jshell/jdk.internal.jshell.tool.JShellTool.getInput(JShellTool.java:1254)
                at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1190)
                at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:991)
                at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:254)
                at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: