RFR: 8356154: Respecify java.net.Socket constructors that allow creating UDP sockets to throw IllegalArgumentException [v3]
Jaikiran Pai
jpai at openjdk.org
Tue May 6 07:26:07 UTC 2025
On Tue, 6 May 2025 06:30:27 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> 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.
In my previous round I misread that the review comment was on SocketImpl class, so I never did apply the review changes on these `Socket` constructor.
I've now updated the PR to drop this paragraph from both these constructors. I'll update the CSR if this and the rest changes look good.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25031#discussion_r2074868700
More information about the net-dev
mailing list