RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v2]

Alan Bateman alanb at openjdk.org
Tue Jan 3 10:31:49 UTC 2023


On Tue, 3 Jan 2023 10:25:21 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Our SocketImpls mostly throw SocketException so inserting the catch of SocketException will avoid the translation for most cases.
>
> Replacing the IOException does not work, this even leads to a compile error " unreported exception IOException" ; so I guess the catch (SocketException e)  needs to be added to the IOException ; not so nice.

I didn't mean to replace it, I meant to insert of catch of SocketException before the IOException. That will avoid throwing SocketException with cause SocketException. If you look at the equivalent in ServerSocket then you'll see what I mean.

-------------

PR: https://git.openjdk.org/jdk/pull/11813


More information about the nio-dev mailing list