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

ConsoleIOContext.countTrailintBackslashes causes NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 23, 24, 25
    • 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.

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

              Created:
              Updated: