mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8215443: The use of TransportContext.fatal() leads to bad coding style
Reviewed-by: ascarpino
This commit is contained in:
parent
5a6385b363
commit
84105b36fd
48 changed files with 454 additions and 585 deletions
|
@ -201,8 +201,7 @@ final class PskKeyExchangeModesExtension {
|
|||
try {
|
||||
spec = new PskKeyExchangeModesSpec(buffer);
|
||||
} catch (IOException ioe) {
|
||||
shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE, ioe);
|
||||
return; // fatal() always throws, make the compiler happy.
|
||||
throw shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE, ioe);
|
||||
}
|
||||
|
||||
// Update the context.
|
||||
|
@ -324,7 +323,7 @@ final class PskKeyExchangeModesExtension {
|
|||
SSLExtensionSpec spec =
|
||||
shc.handshakeExtensions.get(SSLExtension.CH_PRE_SHARED_KEY);
|
||||
if (spec != null) {
|
||||
shc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
|
||||
throw shc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
|
||||
"pre_shared_key key extension is offered " +
|
||||
"without a psk_key_exchange_modes extension");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue