All call for aid response to a comment on the CSR from Joe.

> I suggesting having some explicit statement about the line count in addition 
> to the number of line terminators.


That is the crux of the skirting around. Line count can mean two things 
depending on whether lines are interpreted as a) character sequences separated 
by line terminators (\r, \n) or b) character sequences terminated by line 
terminators. If we state one thing a) then a developer will state, no it's b). 
It all depends on what the developer does next.

Generally, core libraries (String::split, String::lines, String::stripIndent) 
interpret lines using a) with the option of having a final line terminator 
which then kind of looks like b). String::lines tries to make this clear, 
"stream of lines extracted from this string, separated by line terminators.", 
but you can still have the optional final line terminator (as does 
String::split("\\R")).

Files::lines and BufferedReader::lines side-step the issue all together 
(assumptions left to the user.) Any wordsmything assistance would be 
appreciated,

-- Jim




> On May 19, 2020, at 5:00 PM, Jim Laskey <[email protected]> wrote:
> 
> Please review this change to remove the preview heading from the javadoc of 
> String::formatted. This also updates the @since to 15.
> 
> Thank you.
> 
> Cheers,
> 
> -- Jim
> 
> 
> csr: https://bugs.openjdk.java.net/browse/JDK-8245399 
> <https://bugs.openjdk.java.net/browse/JDK-8245399>
> jbs: https://bugs.openjdk.java.net/browse/JDK-8245398 
> <https://bugs.openjdk.java.net/browse/JDK-8245398>
> 
> 

Reply via email to