RFR: 8247403: JShell: No custom input (e.g. from GUI) possible with JavaShellToolBuilder [v3]

Archie Cobbs acobbs at openjdk.org
Sat May 6 15:28:28 UTC 2023


On Mon, 24 May 2021 08:20:44 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> Basically, JShell's ConsoleIOContext always uses the JLine's default terminal, which uses System.in, or equivalent, for input. But, if the JShell tool has been created using JavaShellToolBuilder, a different input might have been provided. The proposed solution is to use a different JLine's terminal in this case, based on the provided input.
>
> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adding note about the default behavior, as suggested.

src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/LineReaderImpl.java line 4160:

> 4158:                 sb.append(ch);
> 4159:         }
> 4160:         if (padToWidth > cols) {

Random blast-from-the-past question: would it be appropriate to submit this change back to the jline project? It doesn't appear to be in the current jline3 master.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/2509#discussion_r1186711227


More information about the kulla-dev mailing list