RFR: JDK-8317603: Improve exception messages thrown by sun.nio.ch.Net native methods (win) [v5]
Matthias Baesken
mbaesken at openjdk.org
Tue Oct 10 07:57:53 UTC 2023
On Mon, 9 Oct 2023 18:38:12 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add missing quotation mark
>
> src/java.base/windows/native/libnio/ch/DatagramChannelImpl.c line 92:
>
>> 90: rv = connect((SOCKET)fd, &sa.sa, sa_len);
>> 91: if (rv == SOCKET_ERROR) {
>> 92: NET_ThrowNew(env, WSAGetLastError(), "connect");
>
> Can you check the copyright date on this and the other files as some of these haven't been updated in a while.
Hi Alan, I adjusted the copyright dates.
> src/java.base/windows/native/libnio/ch/Net.c line 556:
>
>> 554: NET_ThrowNew(env, WSAGetLastError(), "setsocketopt to block source");
>> 555: } else {
>> 556: NET_ThrowNew(env, WSAGetLastError(), "setsocketopt to unblock source");
>
> I think this can be reduced to one message (block or unblock) source as it doesn't add value as the stack trace will make it very clear if a source-specific block or unblock op.
Okay, I reduced it to one message.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16057#discussion_r1351755006
PR Review Comment: https://git.openjdk.org/jdk/pull/16057#discussion_r1351756715
More information about the nio-dev
mailing list