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
cc1a209185
commit
322fe8ec85
@ -244,6 +244,10 @@ public class JdkSslContext extends SslContext {
|
|||||||
case REQUIRE:
|
case REQUIRE:
|
||||||
engine.setNeedClientAuth(true);
|
engine.setNeedClientAuth(true);
|
||||||
break;
|
break;
|
||||||
|
case NONE:
|
||||||
|
break; // exhaustive cases
|
||||||
|
default:
|
||||||
|
throw new Error("Unknown auth " + clientAuth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return apn.wrapperFactory().wrapSslEngine(engine, apn, isServer());
|
return apn.wrapperFactory().wrapSslEngine(engine, apn, isServer());
|
||||||
|
Loading…
Reference in New Issue
Block a user