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

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


The following commit(s) were added to refs/heads/main by this push:
     new a156bbae37 [CXF-9085] Replace use of Google Guava with JDK API (#2160)
a156bbae37 is described below

commit a156bbae372f325fd5eff17d900d398e95c46ac2
Author: Thomas Traude <[email protected]>
AuthorDate: Fri Nov 22 16:40:32 2024 +0100

    [CXF-9085] Replace use of Google Guava with JDK API (#2160)
    
    Replace `com.google.common.io.Files.createTempDir` with 
`java.nio.file.Files.createTempDirectory`.
    
    See
    https://sonarsource.github.io/rspec/#/rspec/S4738
    "Java features should be preferred to Guava"
---
 parent/pom.xml                                                   | 1 -
 .../test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java | 9 ++++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index ed48cc09a7..cfa58a6c85 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -118,7 +118,6 @@
         <cxf.geronimo.openapi.version>1.0.15</cxf.geronimo.openapi.version>
         <cxf.glassfish.el.version>4.0.2</cxf.glassfish.el.version>
         <cxf.glassfish.json.version>2.0.1</cxf.glassfish.json.version>
-        <cxf.guava.version>32.1.3-jre</cxf.guava.version>
         <cxf.hamcrest.version>3.0</cxf.hamcrest.version>
         <cxf.hazelcast.version>5.5.0</cxf.hazelcast.version>
         <cxf.hibernate.em.version>6.5.2.Final</cxf.hibernate.em.version>
diff --git 
a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
 
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
index 89e551e21a..5d7767b1c6 100644
--- 
a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
+++ 
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
@@ -30,6 +30,7 @@ import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.http.HttpConnectTimeoutException;
 import java.net.http.HttpTimeoutException;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -47,8 +48,6 @@ import javax.xml.transform.stream.StreamSource;
 
 import org.w3c.dom.Document;
 
-import com.google.common.io.Files;
-
 import jakarta.xml.ws.AsyncHandler;
 import jakarta.xml.ws.BindingProvider;
 import jakarta.xml.ws.Dispatch;
@@ -1017,7 +1016,7 @@ public class ClientServerTest extends 
AbstractBusClientServerTestBase {
     
     @Test
     public void testEchoProviderThresholdAsync() throws Exception {
-        final File f = Files.createTempDir();
+        final File f = Files.createTempDirectory(null).toFile();
         LOG.info("Using temp folder: " + f.getAbsolutePath());
         
         
System.setProperty("org.apache.cxf.io.CachedOutputStream.OutputDirectory", 
f.getAbsolutePath());
@@ -1048,7 +1047,7 @@ public class ClientServerTest extends 
AbstractBusClientServerTestBase {
     
     @Test
     public void testEchoProviderThresholdAsyncThrows() throws Exception {
-        final File f = Files.createTempDir();
+        final File f = Files.createTempDirectory(null).toFile();
         LOG.info("Using temp folder: " + f.getAbsolutePath());
         
         
System.setProperty("org.apache.cxf.io.CachedOutputStream.OutputDirectory", 
f.getAbsolutePath());
@@ -1081,7 +1080,7 @@ public class ClientServerTest extends 
AbstractBusClientServerTestBase {
 
     @Test
     public void testEchoProviderThresholdTimeout() throws Exception {
-        final File f = Files.createTempDir();
+        final File f = Files.createTempDirectory(null).toFile();
         LOG.info("Using temp folder: " + f.getAbsolutePath());
         
         
System.setProperty("org.apache.cxf.io.CachedOutputStream.OutputDirectory", 
f.getAbsolutePath());

Reply via email to