From d5ad5a47ac55adb5a93334c40166e5aec85ec74f Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Mon, 25 Jan 2010 11:26:55 +0000 Subject: [PATCH] Use default parameters wherever possible to initialize SSLContexts --- .../example/securechat/SecureChatSslContextFactory.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/jboss/netty/example/securechat/SecureChatSslContextFactory.java b/src/main/java/org/jboss/netty/example/securechat/SecureChatSslContextFactory.java index 4fc9f984cb..ae0ff1ebfe 100644 --- a/src/main/java/org/jboss/netty/example/securechat/SecureChatSslContextFactory.java +++ b/src/main/java/org/jboss/netty/example/securechat/SecureChatSslContextFactory.java @@ -58,9 +58,7 @@ public class SecureChatSslContextFactory { // Initialize the SSLContext to work with our key managers. serverContext = SSLContext.getInstance(PROTOCOL); - serverContext.init( - kmf.getKeyManagers(), - SecureChatTrustManagerFactory.getTrustManagers(), null); + serverContext.init(kmf.getKeyManagers(), null, null); } catch (Exception e) { throw new Error( "Failed to initialize the server-side SSLContext", e); @@ -68,8 +66,7 @@ public class SecureChatSslContextFactory { try { clientContext = SSLContext.getInstance(PROTOCOL); - clientContext.init( - null, SecureChatTrustManagerFactory.getTrustManagers(), null); + clientContext.init(null, SecureChatTrustManagerFactory.getTrustManagers(), null); } catch (Exception e) { throw new Error( "Failed to initialize the client-side SSLContext", e);