RFR (S) 8222491: jcmd can fail converting UTF8 output to strings
David Holmes
david.holmes at oracle.com
Tue Apr 16 10:30:44 UTC 2019
On 16/04/2019 7:06 pm, Schmelter, Ralf wrote:
> Hi David,
>
> of course you could just copy the bytes to System.out, but that would not respect the platforms character encoding.
I meant to do it with the encoding respected of course.
> And since the PrintWriter of System.out has no write(char[], int, int) method, it is probably easier to just convert to a string. At least I've not found a convenience method to pipe a Reader to a PrintWriter using the char[] based methods.
I feel there must be a better way :) but the fix is fine as-is.
Thanks,
David
>
> Best regards,
> Ralf
>
> -----Original Message-----
> From: David Holmes <david.holmes at oracle.com>
> Sent: Dienstag, 16. April 2019 08:41
> To: Langer, Christoph <christoph.langer at sap.com>; Schmelter, Ralf <ralf.schmelter at sap.com>; serviceability-dev at openjdk.java.net
> Subject: Re: RFR (S) 8222491: jcmd can fail converting UTF8 output to strings
>
> Hi Ralf, Christoph,
>
> On 16/04/2019 3:54 pm, Langer, Christoph wrote:
>> Hi Ralf,
>>
>> looks good, thanks for fixing this. I can push it for you.
>>
>> Can we please get another Reviewer's review?
>
> Well I agree that the fix addresses the problem that has been described.
>
> But I can't help but think there has to be a simpler way to pipe one
> inputstream into an outputstream without all the intermediary steps - ie
> creating strings. ??
>
> Cheers,
> David
>
More information about the serviceability-dev
mailing list