RFR: 8331535: Incorrect prompt for Console.readLine [v2]

Jan Lahoda jlahoda at openjdk.org
Mon May 6 15:45:54 UTC 2024


On Fri, 3 May 2024 11:20:52 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase.
>
> src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java line 101:
> 
>> 99:             try {
>> 100:                 initJLineIfNeeded();
>> 101:                 return jline.readLine(fmt.formatted(args).replace("%", "%%"));
> 
> I understand that [JLine interprets `%` in a prompt](https://github.com/openjdk/jdk/blob/4ed38f5ad5f822ab948257ed39717ea919fd32ed/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/LineReaderImpl.java#L4050), but are the interpretation rules documented on JLine GitHub page or elsewhere?

There's a description in the javadoc:
https://www.javadoc.io/doc/org.jline/jline/latest/org/jline/reader/LineReader.html

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19081#discussion_r1591196087


More information about the core-libs-dev mailing list