RFR: 8331535: Incorrect prompt for Console.readLine [v5]
Jan Lahoda
jlahoda at openjdk.org
Fri May 10 11:00:55 UTC 2024
> When JLine reads a line, there may be a prompt provided. However, JLine will not interpret the prompt literally, it will handle `%` specially. As a consequence, doing:
>
> System.console().readLine("%%s");
>
>
> will not print `%s`, as first `String.format` is used, which will convert `%%s` to `%s`, and then JLine will interpret the `%`. The proposed solution is to duplicate the `%`, so that JLine will print it.
Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
Fixing the '%' prompt problem for JShell tools' console.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19081/files
- new: https://git.openjdk.org/jdk/pull/19081/files/a138981e..da84810f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19081&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19081&range=03-04
Stats: 85 lines in 3 files changed: 82 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/19081.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19081/head:pull/19081
PR: https://git.openjdk.org/jdk/pull/19081
More information about the core-libs-dev
mailing list