[8u] RFR 8209333: Socket reset issue for TLS 1.3 socket close

Andrew Haley aph at redhat.com
Sat Jan 16 11:11:55 UTC 2021


Hi,

On 1/13/21 10:12 PM, Alvarez, David wrote:
> 
> I have uploaded two new versions of the patch.
> 
> The first one replaces the try-with-resources with its equivalent. This
> removes the need for the SuppressWarnings:
> 
> http://cr.openjdk.java.net/~alvdavi/webrevs/8209333/webrev.8u.jdk.01/
> 
> 
> The second one is what Andrew was suggesting, just adding the finally
> block. The only problem with this approach is that an exception in the
> close call would override an exception in the deplete call. The deplete
> call seems pretty safe though, as it is already suppresing potential
> IOExceptions, so this is probably fine.
> 
> http://cr.openjdk.java.net/~alvdavi/webrevs/8209333/webrev.8u.jdk.02/
> 
> I really don't care which version gets approved. I went through all
> three before. My first implementation was v02, then I moved to v01
> because I wanted to ensure there was no possible difference on how
> exceptions were being thrown and finally to v00 with the
> SuppressWarnings because v01 was just ugly. 

Thank you very much for doing this. It certainly wasn't my intention to
change the behaviour of this code, so I think my suggestion is not
appropriate. I also agree that v01 is just ugly.

So, please go ahead with the SuppressWarnings. I'm sorry I ever doubted
you.  :-)

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the jdk8u-dev mailing list