From 84ebb4c315eb741e9ddc848422cf544706811434 Mon Sep 17 00:00:00 2001 From: Scott Mitchell Date: Tue, 14 Feb 2017 14:49:22 -0800 Subject: [PATCH] Fix checkstyle issues introduced by fdcad3150efde5676a4b895236703710ae15e9e4 --- .../ssl/ReferenceCountedOpenSslEngine.java | 2 +- .../java/io/netty/handler/ssl/SSLEngineTest.java | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java b/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java index c4b5321dd2..bf63fc37fe 100644 --- a/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java +++ b/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java @@ -1467,7 +1467,7 @@ public class ReferenceCountedOpenSslEngine extends SSLEngine implements Referenc * {@link SSL#setVerify(long, int, int)}. */ @UnstableApi - public synchronized final void setVerify(int verifyMode, int depth) { + public final synchronized void setVerify(int verifyMode, int depth) { SSL.setVerify(ssl, verifyMode, depth); } diff --git a/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java b/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java index 63daef6b90..fe903cc0a9 100644 --- a/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java +++ b/handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java @@ -545,9 +545,11 @@ public abstract class SSLEngineTest { serverKeyStore.load(getClass().getResourceAsStream("mutual_auth_server.p12"), password); final KeyStore clientKeyStore = KeyStore.getInstance("PKCS12"); clientKeyStore.load(getClass().getResourceAsStream("mutual_auth_invalid_client.p12"), password); - final KeyManagerFactory serverKeyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + final KeyManagerFactory serverKeyManagerFactory = + KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); serverKeyManagerFactory.init(serverKeyStore, password); - final KeyManagerFactory clientKeyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + final KeyManagerFactory clientKeyManagerFactory = + KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); clientKeyManagerFactory.init(clientKeyStore, password); File commonCertChain = new File(getClass().getResource("mutual_auth_ca.pem").getFile()); @@ -563,15 +565,18 @@ public abstract class SSLEngineTest { testMutualAuthClientCertFail(auth, "mutual_auth_invalid_client.p12", false); } - private void testMutualAuthClientCertFail(ClientAuth auth, String clientCert, boolean serverInitEngine) throws Exception { + private void testMutualAuthClientCertFail(ClientAuth auth, String clientCert, boolean serverInitEngine) + throws Exception { char[] password = "example".toCharArray(); final KeyStore serverKeyStore = KeyStore.getInstance("PKCS12"); serverKeyStore.load(getClass().getResourceAsStream("mutual_auth_server.p12"), password); final KeyStore clientKeyStore = KeyStore.getInstance("PKCS12"); clientKeyStore.load(getClass().getResourceAsStream(clientCert), password); - final KeyManagerFactory serverKeyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + final KeyManagerFactory serverKeyManagerFactory = + KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); serverKeyManagerFactory.init(serverKeyStore, password); - final KeyManagerFactory clientKeyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + final KeyManagerFactory clientKeyManagerFactory = + KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); clientKeyManagerFactory.init(clientKeyStore, password); File commonCertChain = new File(getClass().getResource("mutual_auth_ca.pem").getFile());