8294848: Unnecessary SSLCipher dispose implementations

Reviewed-by: xuelei, valeriep, wetmore
This commit is contained in:
Daniel Jeliński 2022-10-10 07:02:27 +00:00
parent 8713dfa64e
commit 8a148bc960

View File

@ -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;