This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch 3.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.5.x-fixes by this push:
new cd4368091b Fix compilation issues due to JDK-11 API leaks (post merge)
cd4368091b is described below
commit cd4368091b86f993d1cb36d3866be36fb8c3dc51
Author: Andriy Redko <[email protected]>
AuthorDate: Mon Oct 7 18:42:52 2024 -0400
Fix compilation issues due to JDK-11 API leaks (post merge)
---
.../src/test/java/org/apache/cxf/systest/hc5/jaxrs/FileStore.java | 4 ++--
.../apache/cxf/systest/hc5/jaxrs/JAXRSAsyncClientChunkingTest.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/FileStore.java
b/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/FileStore.java
index 753e70130a..1490f9e21f 100644
---
a/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/FileStore.java
+++
b/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/FileStore.java
@@ -68,12 +68,12 @@ public class FileStore {
return Response.ok(new StreamingOutput() {
@Override
public void write(OutputStream out) throws IOException,
WebApplicationException {
- in.transferTo(out);
+ IOUtils.copyAndCloseInput(in, out);
}
}).build();
} else {
// Make sure we have small amount of data for chunking to not
kick in
- final byte[] content = in.readAllBytes();
+ final byte[] content = IOUtils.readBytesFromStream(in);
return Response.ok(Arrays.copyOf(content, content.length /
10)).build();
}
} finally {
diff --git
a/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/JAXRSAsyncClientChunkingTest.java
b/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/JAXRSAsyncClientChunkingTest.java
index 230e9760ae..8bac8c05f0 100644
---
a/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/JAXRSAsyncClientChunkingTest.java
+++
b/systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/JAXRSAsyncClientChunkingTest.java
@@ -24,7 +24,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Collection;
-import java.util.List;
import java.util.Random;
import javax.ws.rs.client.Entity;
@@ -78,7 +77,8 @@ public class JAXRSAsyncClientChunkingTest extends
AbstractBusClientServerTestBas
@Test
public void testMultipartChunking() {
final String url = "http://localhost:" + PORT + "/file-store";
- final WebClient webClient = WebClient.create(url, List.of(new
MultipartProvider())).query("chunked", chunked);
+ final WebClient webClient = WebClient.create(url,
+ Arrays.asList(new MultipartProvider())).query("chunked", chunked);
final ClientConfiguration config = WebClient.getConfig(webClient);
config.getBus().setProperty(AsyncHTTPConduit.USE_ASYNC, true);