JDK-8221759 : Crash when completing "java.io.File.path"
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 11,12,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-01
  • Updated: 2020-12-10
  • Resolved: 2019-05-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.11-oracleFixed 13 b21Fixed
Description
In jshell, type:
java.io.File.path
and press tab. This crashes with:
---
jshell> java.io.File.path
pathSeparator       pathSeparatorChar   

java.io.File.pathSeparator
Exception in thread "main" java.lang.UnsupportedOperationException: Should not get here.
        at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext$ExpressionSignaturesTask.description(ConsoleIOContext.java:720)
        at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.complete(ConsoleIOContext.java:406)
        at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext$1.doComplete(ConsoleIOContext.java:142)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.expandOrComplete(LineReaderImpl.java:3875)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:585)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:404)
        at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.readLine(ConsoleIOContext.java:201)
        at jdk.jshell/jdk.internal.jshell.tool.JShellTool.getInput(JShellTool.java:1238)
        at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1174)
        at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:975)
        at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:254)
        at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
---

Originally reported here:
https://mail.openjdk.java.net/pipermail/kulla-dev/2019-March/002385.html
Comments
Fix Request (11u) This improves jshell reliability. Patch applies cleanly to 11u, new test fails without the fix and passes with it. Patched builds passes tier{1,2}.
31-07-2020

Checked it also affects 11u.
18-06-2019

Review thread: https://mail.openjdk.java.net/pipermail/kulla-dev/2019-April/002389.html
16-04-2019