Use switch-case
This commit is contained in:
parent
def55f5358
commit
45f937f62b
@ -1215,12 +1215,13 @@ public class SslHandler extends FrameDecoder
|
|||||||
synchronized (handshakeLock) {
|
synchronized (handshakeLock) {
|
||||||
result = engine.unwrap(inNetBuf, outAppBuf);
|
result = engine.unwrap(inNetBuf, outAppBuf);
|
||||||
|
|
||||||
// notify about the CLOSED state of the SSLEngine. See #137
|
switch (result.getStatus()) {
|
||||||
if (result.getStatus() == Status.CLOSED) {
|
case CLOSED:
|
||||||
sslEngineCloseFuture.setClosed();
|
// notify about the CLOSED state of the SSLEngine. See #137
|
||||||
}
|
sslEngineCloseFuture.setClosed();
|
||||||
if (result.getStatus() == Status.BUFFER_OVERFLOW) {
|
break;
|
||||||
throw new SSLException("SSLEngine.unwrap() reported an impossible buffer overflow.");
|
case BUFFER_OVERFLOW:
|
||||||
|
throw new SSLException("SSLEngine.unwrap() reported an impossible buffer overflow.");
|
||||||
}
|
}
|
||||||
|
|
||||||
final HandshakeStatus handshakeStatus = result.getHandshakeStatus();
|
final HandshakeStatus handshakeStatus = result.getHandshakeStatus();
|
||||||
|
Loading…
Reference in New Issue
Block a user