From 8a148bc960a61908359f9e6dd62c8e7791cc2690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?= Date: Mon, 10 Oct 2022 07:02:27 +0000 Subject: [PATCH] 8294848: Unnecessary SSLCipher dispose implementations Reviewed-by: xuelei, valeriep, wetmore --- .../classes/sun/security/ssl/SSLCipher.java | 88 ------------------- 1 file changed, 88 deletions(-) diff --git a/src/java.base/share/classes/sun/security/ssl/SSLCipher.java b/src/java.base/share/classes/sun/security/ssl/SSLCipher.java index e30480dc369..f6909791f7d 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLCipher.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLCipher.java @@ -1669,17 +1669,6 @@ enum SSLCipher { -1, -1L, pt.slice()); } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int estimateFragmentSize(int packetSize, int headerSize) { return packetSize - headerSize - recordIvSize - tagSize; @@ -1793,17 +1782,6 @@ enum SSLCipher { return len + nonce.length; } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int getExplicitNonceSize() { return recordIvSize; @@ -1966,17 +1944,6 @@ enum SSLCipher { -1, -1L, pt.slice()); } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int estimateFragmentSize(int packetSize, int headerSize) { return packetSize - headerSize - tagSize; @@ -2096,17 +2063,6 @@ enum SSLCipher { return len; } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int getExplicitNonceSize() { return 0; @@ -2235,17 +2191,6 @@ enum SSLCipher { -1, -1L, pt.slice()); } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int estimateFragmentSize(int packetSize, int headerSize) { return packetSize - headerSize - tagSize; @@ -2364,17 +2309,6 @@ enum SSLCipher { return len; } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int getExplicitNonceSize() { return 0; @@ -2526,17 +2460,6 @@ enum SSLCipher { -1, -1L, pt.slice()); } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int estimateFragmentSize(int packetSize, int headerSize) { return packetSize - headerSize - tagSize; @@ -2657,17 +2580,6 @@ enum SSLCipher { return len; } - @Override - void dispose() { - if (cipher != null) { - try { - cipher.doFinal(); - } catch (Exception e) { - // swallow all types of exceptions. - } - } - } - @Override int getExplicitNonceSize() { return 0;