ConsoleIOContext.countTrailintBackslashes causes NullPointerException

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 23, 24, 25
    • Component/s: tools
    • None
    • x86_64
    • windows

      The test
      jdk/jshell/TerminalNoExecTest.java
      runs sometimes on Windows into this exception :

      Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "text" is null
      at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.countTrailintBackslashes(ConsoleIOContext.java:304)
      at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.<init>(ConsoleIOContext.java:203)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:1014)
      at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.run(JShellToolBuilder.java:259)
      at TerminalNoExecTest.main(TerminalNoExecTest.java:61)

      Seems we miss a null check somewhere in the coding. This happens 1-2 times a month in our test infrastructure.

            Assignee:
            Unassigned
            Reporter:
            Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: