Exhaust non-exhaustive switch cases
Motivation: ErrorProne warns about missing cases in switch statements that appear as an oversight. Modifcation: Add the last case to statement to ensure all cases are covered. Result: Able to enable Error Prone static analysis
This commit is contained in:
parent
4764d12fc0
commit
344360af30
@ -248,6 +248,10 @@ public class JdkSslContext extends SslContext {
|
||||
case REQUIRE:
|
||||
engine.setNeedClientAuth(true);
|
||||
break;
|
||||
case NONE:
|
||||
break; // exhaustive cases
|
||||
default:
|
||||
throw new Error("Unknown auth " + clientAuth);
|
||||
}
|
||||
}
|
||||
return apn.wrapperFactory().wrapSslEngine(engine, apn, isServer());
|
||||
|
Loading…
Reference in New Issue
Block a user