You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2019/06/20 13:00:58 UTC

[cxf] branch master updated (ab2a445 -> 8296397)

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from ab2a445  Revert "[CXF-8057]upgrade to use stax2-api and woodstox-core latest version"
     new 5059b7b  CXF-8060 - Switch default keystore type to JKS. This should work with both JKS + PKCS12 as a result.
     new 8296397  Switch to use Files.createTemFile

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/cxf/configuration/jsse/SSLUtils.java    |  2 +-
 .../management/persistence/FilesystemExchangeDataDAO.java   | 13 +++++++------
 .../cxf/systests/cdi/base/tomcat/AbstractTomcatServer.java  |  3 ++-
 3 files changed, 10 insertions(+), 8 deletions(-)


[cxf] 01/02: CXF-8060 - Switch default keystore type to JKS. This should work with both JKS + PKCS12 as a result.

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 5059b7ba0c0a3fdd9ac6b2b9585df8e23bf1f005
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Jun 20 12:11:39 2019 +0100

    CXF-8060 - Switch default keystore type to JKS. This should work with both JKS + PKCS12 as a result.
---
 core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
index 86fcae1..4fff623 100644
--- a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
+++ b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
@@ -62,7 +62,7 @@ public final class SSLUtils {
 
     static final String PKCS12_TYPE = "PKCS12";
 
-    private static final String DEFAULT_KEYSTORE_TYPE = "PKCS12";
+    private static final String DEFAULT_KEYSTORE_TYPE = "JKS";
     private static final String DEFAULT_TRUST_STORE_TYPE = "JKS";
 
     private static final String HTTPS_CIPHER_SUITES = "https.cipherSuites";


[cxf] 02/02: Switch to use Files.createTemFile

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 8296397fd4125f91e8d56a044f4680c91aae78d6
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Jun 20 14:00:41 2019 +0100

    Switch to use Files.createTemFile
---
 .../management/persistence/FilesystemExchangeDataDAO.java   | 13 +++++++------
 .../cxf/systests/cdi/base/tomcat/AbstractTomcatServer.java  |  3 ++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java b/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java
index e346990..620185f 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java
@@ -18,10 +18,11 @@
  */
 package org.apache.cxf.management.persistence;
 
-import java.io.File;
 import java.io.OutputStream;
 import java.io.StringWriter;
 import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -40,12 +41,12 @@ public class FilesystemExchangeDataDAO implements ExchangeDataDAO {
     }
 
     public void save(ExchangeData exchange) throws Exception {
-        File file = null;
+        Path file = null;
 
         if (this.directory == null) {
-            file = File.createTempFile("cxf-management-", "." + this.extension);
+            file = Files.createTempFile("cxf-management-", "." + this.extension);
         } else {
-            file = File.createTempFile("cxf-management-", "." + this.extension, new File(this.directory));
+            file = Files.createTempFile(Paths.get(this.directory), "cxf-management-", "." + this.extension);
         }
 
         StringWriter stringWriter = new StringWriter();
@@ -117,12 +118,12 @@ public class FilesystemExchangeDataDAO implements ExchangeDataDAO {
             }
         }
 
-        try (OutputStream fileOutputStream = Files.newOutputStream(file.toPath())) {
+        try (OutputStream fileOutputStream = Files.newOutputStream(file)) {
             fileOutputStream.write(stringWriter.getBuffer().toString().getBytes());
         }
 
         if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Exchange data saved in " + file.getAbsolutePath());
+            LOG.fine("Exchange data saved in " + file);
         }
 
     }
diff --git a/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/tomcat/AbstractTomcatServer.java b/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/tomcat/AbstractTomcatServer.java
index fb431b5..bc45212 100644
--- a/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/tomcat/AbstractTomcatServer.java
+++ b/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/tomcat/AbstractTomcatServer.java
@@ -21,6 +21,7 @@ package org.apache.cxf.systests.cdi.base.tomcat;
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.Files;
 
 import org.apache.catalina.startup.Tomcat;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
@@ -64,7 +65,7 @@ public abstract class AbstractTomcatServer extends AbstractBusTestServerBase {
     }
 
     private static File createTemporaryDirectory() throws IOException {
-        final File base = File.createTempFile("tmp-", "");
+        final File base = Files.createTempFile("tmp-", "").toFile();
 
         if (!base.delete()) {
             throw new IOException("Cannot (re)create base folder: " + base.getAbsolutePath());