Fix a few linter warnings (#1122)

This commit is contained in:
Lai Jiang 2021-05-04 13:35:31 -04:00 committed by GitHub
parent 509c0dcd17
commit d285edef3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -76,7 +76,7 @@ public class SslServerInitializer<C extends Channel> extends ChannelInitializer<
* OpenSSL provider (if used), so there is no need to include the OpenSSL name variants here. More * OpenSSL provider (if used), so there is no need to include the OpenSSL name variants here. More
* information about these cipher suites and their OpenSSL names can be found at ciphersuite.info. * information about these cipher suites and their OpenSSL names can be found at ciphersuite.info.
*/ */
private static final ImmutableList ALLOWED_TLS_CIPHERS = private static final ImmutableList<String> ALLOWED_TLS_CIPHERS =
ImmutableList.of( ImmutableList.of(
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",

View file

@ -458,8 +458,12 @@ class SslServerInitializerTest {
private static boolean compareSemanticVersion( private static boolean compareSemanticVersion(
ImmutableList<Integer> v1, ImmutableList<Integer> v2) { ImmutableList<Integer> v1, ImmutableList<Integer> v2) {
for (int i : ImmutableList.of(0, 1, 2)) { for (int i : ImmutableList.of(0, 1, 2)) {
if (v1.get(i) > v2.get(i)) return true; if (v1.get(i) > v2.get(i)) {
if (v1.get(i) < v2.get(i)) return false; return true;
}
if (v1.get(i) < v2.get(i)) {
return false;
}
} }
return true; return true;
} }