You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "ffang (via GitHub)" <gi...@apache.org> on 2026/01/09 03:25:44 UTC

Re: [PR] [CXF-9190] Fix OpenScanHub findings: race conditions and resource leaks [cxf]

ffang commented on code in PR #2781:
URL: https://github.com/apache/cxf/pull/2781#discussion_r2672790978


##########
distribution/src/main/release/samples/jax_rs/search/src/main/java/demo/jaxrs/search/client/Client.java:
##########
@@ -99,7 +99,10 @@ private static void uploadToCatalog(final String url, final CloseableHttpClient
 
         final HttpPost post = new HttpPost(url);
         MultipartEntity entity = new MultipartEntity();
-        byte[] bytes = IOUtils.readBytesFromStream(Client.class.getResourceAsStream("/" + filename));
+        byte[] bytes;
+        try (InputStream is = Client.class.getResourceAsStream("/" + filename)) {

Review Comment:
   No import of class InputStream which breaks the build



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org