8223813: (aio) Iocp.getErrorMessage should drop trailing \r\n

Brian Burkhalter brian.burkhalter at oracle.com
Tue Jun 11 19:56:06 UTC 2019


Hi Roger,

Thanks for the $0.02.

> On Jun 11, 2019, at 12:14 PM, Roger Riggs <Roger.Riggs at Oracle.com> wrote:
> 
> Having the extraneous suffix consistently removed seems like a good thing.
> Though I'm not sure what the best form of the utility function is:
>  1) return the count of characters to remove
>  2) just truncate the buffer.

I am not sure either nor am I convinced that it would even be worth the effort. As mentioned there are already getLastErrorString() and getErrorString() for chars so I suppose the equivalent for WCHARs would need to be added for at least one of these.

> There may be ways to force some of the errors that would lead to the truncation, but testing all uses will not be practical.

That’s what I thought.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190611/96604d59/attachment-0001.html>


More information about the nio-dev mailing list