RFR: JDK-8031482: Some jcmd commands generate output with \n as a line separator instead of \r\n on Windows

Chris Plummer chris.plummer at oracle.com
Thu Jan 11 16:40:31 UTC 2018


Hi Gary,

I'm sure that fixes the problem, although there's no longer any platform 
abstraction of what a newline is. Theoretically there could be a 
platform for which it won't work, but I'm not so sure we really care 
about theoreticals here, since it is just for testing purposes and 
solves the issue on the platforms we know of. So thumbs up.

Chris

On 1/11/18 8:28 AM, Gary Adams wrote:
> Here's a simple fix to the split pattern when output lines are using 
> mixed line
> separators in the same outputstream . e.g. split("\r\n|\n")
>
>   Issue: https://bugs.openjdk.java.net/browse/JDK-8031482
>   Webrev: http://cr.openjdk.java.net/~gadams/JDK-8031482
>
> testing in progress ...





More information about the serviceability-dev mailing list