RFR: 8356154: Respecify java.net.Socket constructors that allow creating UDP sockets to throw IllegalArgumentException [v3]
Alan Bateman
alanb at openjdk.org
Tue May 6 06:35:17 UTC 2025
On Mon, 5 May 2025 13:52:35 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> reword SocketImpl.create(...) API doc
>
> src/java.base/share/classes/java/net/Socket.java line 384:
>
>> 382: * stream socket. Only stream socket creation is allowed. If the stream
>> 383: * argument is {@code false}, then this constructor throws
>> 384: * {@code IllegalArgumentException}.
>
> I would be tempted to drop this paragraph and just change the description of the `@param stream` to say "must be true".
I re-read this paragraph again today and I think it would be better to remove it completely from both constructors.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25031#discussion_r2074807828
More information about the nio-dev
mailing list