On Tue, 3 Jan 2023 08:50:10 GMT, Matthias Baesken <[email protected]> wrote:
>> src/java.base/share/classes/java/net/Socket.java line 535:
>>
>>> 533: created = true;
>>> 534: } catch (IOException e) {
>>> 535: throw new SocketException(e.getMessage(), e);
>>
>> For this one, you could `catch (SocketException e) { throw e; }` as the
>> exception from the impl will be a SocketException anyway. That would help
>> avoid the confusing cause.
>
> Hi Alan, createImpl throws SocketException anyway, so can't we just remove
> the catch completely in this case ?
> Or are there other IOExceptions?
Our SocketImpls mostly throw SocketException so inserting the catch of
SocketException will avoid the translation for most cases.
-------------
PR: https://git.openjdk.org/jdk/pull/11813