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:
Carl Mastrangelo 2017-06-23 20:04:43 -07:00 committed by Norman Maurer
parent cc1a209185
commit 322fe8ec85

View File

@ -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());