RFR 8166051: [jline] Cannot parse .inputrc with \r
Robert Field
robert.field at oracle.com
Fri Sep 16 16:26:36 UTC 2016
BufferedReader provides platform independent behavior. Which is
appropriate here because configuration files get copied between
platforms with different line-end standards.
The proposed replacement exchanges this for a platform dependent strategy.
While it would address this one obscure failure, my concern is that it
will create new, possibly more common, problems. specifically where a
file where \r\n is used -- injecting \r into the results.
Not sure what the right choice is.
A compromise might be to accept \n or \r\n on all platforms, and \r
alone only on platforms that accept that as a line end.
I am concerned with forking jline, esp. if it not a clear fix.
Can we address this at a higher level? More tolerant error handling?
-Robert
On 09/16/16 02:23, Jan Lahoda wrote:
> Please review a change to how .inputrc is read. Currently, it uses
> BufferedReader.readLine(), which interprets '\r' as a line separator,
> and so the '\r' character cannot be used in the macros. The proposed
> change is to use System.getProperty("line.separator") and "\n" as line
> separators.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8166051
>
> Webrev:
> http://cr.openjdk.java.net/~jlahoda/8166051/webrev.00/
>
> Thanks!
>
> Jan
More information about the kulla-dev
mailing list