RFR: JDK-8265362 java/net/Socket/UdpSocket.java fails with "java.net.BindException: Address already in use" (macos-aarch64) [v2]

Christos Zoulas christos at zoulas.com
Mon May 24 14:58:05 UTC 2021

> On May 24, 2021, at 10:39 AM, Mark Sheppard <msheppar at openjdk.java.net> wrote:
> I could have used return directly in multiple places ... but my style preference is a single exit point from a method

My preference is the opposite :-) I like the "early returns" coding style because I don't need to "keep state" while
reviewing code; specially long methods (my brain is not as good as it used to be). In this case there is also over
initialization of "s", (it does not need to be set to null), and because of the java flow control analysis deficiencies
"s" cannot be declared to  be "final".  So getting rid of the variable makes a lot of sense to me (fewer lines of code
and less complexity).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20210524/75a4925d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20210524/75a4925d/signature.asc>

More information about the net-dev mailing list