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 4764d12fc0
commit 344360af30

View File

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