> 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:

  Update test/jdk/java/io/Console/ConsolePromptTest.java
  
  Co-authored-by: Adam Sotona <10807609+asot...@users.noreply.github.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19081/files
  - new: https://git.openjdk.org/jdk/pull/19081/files/da84810f..441bdad8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19081&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19081&range=04-05

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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

Reply via email to