Repository: logging-log4j2
Updated Branches:
  refs/heads/master e3deba715 -> ec5200a74


LOG4J2-1896 use factory method instead of constructor


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ec5200a7
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ec5200a7
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ec5200a7

Branch: refs/heads/master
Commit: ec5200a74bd3988a23e6ba60d66b5f1203787a8f
Parents: e3deba7
Author: rpopma <[email protected]>
Authored: Sun Sep 24 22:08:00 2017 +0900
Committer: rpopma <[email protected]>
Committed: Sun Sep 24 22:08:00 2017 +0900

----------------------------------------------------------------------
 .../SecureSocketAppenderSocketOptionsTest.java      | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ec5200a7/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SecureSocketAppenderSocketOptionsTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SecureSocketAppenderSocketOptionsTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SecureSocketAppenderSocketOptionsTest.java
index ade4c56..b92e393 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SecureSocketAppenderSocketOptionsTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SecureSocketAppenderSocketOptionsTest.java
@@ -27,7 +27,6 @@ import org.apache.logging.log4j.core.net.Rfc1349TrafficClass;
 import org.apache.logging.log4j.core.net.SocketOptions;
 import org.apache.logging.log4j.core.net.TcpSocketManager;
 import org.apache.logging.log4j.core.net.ssl.KeyStoreConfiguration;
-import org.apache.logging.log4j.core.net.ssl.MemoryPasswordProvider;
 import org.apache.logging.log4j.core.net.ssl.SslConfiguration;
 import org.apache.logging.log4j.core.net.ssl.StoreConfigurationException;
 import org.apache.logging.log4j.core.net.ssl.TestConstants;
@@ -74,10 +73,17 @@ public class SecureSocketAppenderSocketOptionsTest {
     }
 
     public static void initServerSocketFactory() throws 
StoreConfigurationException {
-        final KeyStoreConfiguration ksc = new 
KeyStoreConfiguration(TestConstants.KEYSTORE_FILE,
-                new MemoryPasswordProvider(TestConstants.KEYSTORE_PWD), null, 
null);
-        final TrustStoreConfiguration tsc = new 
TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE,
-                new MemoryPasswordProvider(TestConstants.TRUSTSTORE_PWD), 
null, null);
+        final KeyStoreConfiguration ksc = 
KeyStoreConfiguration.createKeyStoreConfiguration(
+                TestConstants.KEYSTORE_FILE, // file
+                TestConstants.KEYSTORE_PWD,  // password
+                null, // key store type
+                null); // algorithm
+
+        final TrustStoreConfiguration tsc = 
TrustStoreConfiguration.createKeyStoreConfiguration(
+                TestConstants.TRUSTSTORE_FILE, // file
+                TestConstants.TRUSTSTORE_PWD, // password
+                null, // key store type
+                null); // algorithm
         sslConfiguration = SslConfiguration.createSSLConfiguration(null, ksc, 
tsc);
         serverSocketFactory = sslConfiguration.getSslServerSocketFactory();
     }

Reply via email to