8263743: redundant lock in SSLSocketImpl

Reviewed-by: jnimeh
This commit is contained in:
Xue-Lei Andrew Fan 2021-03-25 05:16:37 +00:00
parent 3fcb499ce6
commit a678a38dd9

View file

@ -1469,13 +1469,7 @@ public final class SSLSocketImpl
}
try {
Plaintext plainText;
socketLock.lock();
try {
plainText = decode(buffer);
} finally {
socketLock.unlock();
}
Plaintext plainText = decode(buffer);
if (plainText.contentType == ContentType.APPLICATION_DATA.id &&
buffer.position() > 0) {
return buffer;