Enable new errorprone checks and fix violations (#3018)

This commit is contained in:
Weimin Yu
2026-04-20 21:03:36 +00:00
committed by GitHub
parent 9d5650132b
commit 3de790fb00
98 changed files with 406 additions and 444 deletions
@@ -152,9 +152,8 @@ public class SslServerInitializer<C extends Channel> extends ChannelInitializer<
PublicKey clientPublicKey = clientCertificate.getPublicKey();
// Note that for non-RSA keys the length would be -1.
int clientCertificateLength = -1;
if (clientPublicKey instanceof RSAPublicKey) {
clientCertificateLength =
((RSAPublicKey) clientPublicKey).getModulus().bitLength();
if (clientPublicKey instanceof RSAPublicKey rsaPublicKey) {
clientCertificateLength = rsaPublicKey.getModulus().bitLength();
}
logger.atInfo().log(
"""