github-advanced-security[bot] commented on code in PR #19454:
URL: https://github.com/apache/druid/pull/19454#discussion_r3223044299


##########
server/src/main/java/org/apache/druid/client/DirectDruidClient.java:
##########
@@ -587,6 +592,35 @@
     queryCancellationExecutor.submit(cancelRunnable);
   }
 
+  private static ListenableFuture<InputStream> wrapFutureWithDecompressor(
+      ListenableFuture<InputStream> future,
+      String contentEncoding
+  )
+  {
+    if ("x-lz4".equals(contentEncoding)) {
+      return Futures.transform(future, DirectDruidClient::newLz4InputStream, 
Execs.directExecutor());
+    }
+    if ("zstd".equals(contentEncoding)) {
+      return Futures.transform(future, DirectDruidClient::newZstdInputStream, 
Execs.directExecutor());
+    }
+    return future;
+  }
+
+  private static InputStream newLz4InputStream(InputStream in)
+  {
+    return new LZ4BlockInputStream(in);

Review Comment:
   ## CodeQL / Deprecated method or constructor invocation
   
   Invoking [LZ4BlockInputStream.LZ4BlockInputStream](1) should be avoided 
because it has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/11209)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to