8223813: (aio) Iocp.getErrorMessage should drop trailing \r\n
Brian Burkhalter
brian.burkhalter at oracle.com
Wed Jun 12 17:02:49 UTC 2019
Actually, never mind, I am being completely lame here: both NET_ThrowNew() and the Windows function LocalFree() are robust to a NULL-valued buf so I think we can just remove the n > 0 or buf == NULL check altogether.
Sorry for the noise: I should have checked this first.
Thanks,
Brian
> On Jun 12, 2019, at 9:51 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>
> I am perhaps beating a dead horse here, but how about this instead?
>
> if (n > 0) {
> NET_ThrowNew(env, err, buf);
> LocalFree(buf);
> } else {
> NET_ThrowNew(env, err, "FormatMessage failed");
> }
>
> After all, an error *did* occur.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190612/d395a162/attachment.html>
More information about the nio-dev
mailing list