On Fri, 29 Nov 2024 13:28:14 GMT, Volkan Yazıcı <d...@openjdk.org> wrote:
>> src/java.base/share/classes/sun/nio/ch/Net.java line 171: >> >>> 169: nx = newSocketException("Already bound"); >>> 170: else if (x instanceof AlreadyConnectedException) >>> 171: nx = newSocketException("already connected"); >> >> Probably better to use "Already connected" here, that will mean it has the >> same case as the exception message in SocketAdaptor.connect. > > I deviated from the first-letter-in-upper-case convention deliberately to > match the message in `Socket`. Are you sure you want me to replace `already > connected` with `Already connected` in `Net`? There are 40+ places in Socket that throw a SocketException with a fixed string. It looks like all but two start with an uppercase letter. So maybe we fix Socket.connect instead. I realise this is adding more to this PR but touching older code is always likely to find little oddities like this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22160#discussion_r1863540646