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


##########
server/src/test/java/org/apache/druid/rpc/RequestBuilderTest.java:
##########
@@ -131,7 +131,7 @@
     // Read and verify content.
     Assert.assertEquals(
         json,
-        StringUtils.fromUtf8(ByteStreams.toByteArray(new 
ChannelBufferInputStream(request.getContent())))
+        StringUtils.fromUtf8(ByteStreams.toByteArray(new 
ByteBufInputStream(request.getContent())))

Review Comment:
   ## CodeQL / Potential input resource leak
   
   This ByteBufInputStream is not always closed on method exit.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/11295)



##########
server/src/test/java/org/apache/druid/rpc/RequestBuilderTest.java:
##########
@@ -153,7 +153,7 @@
     // Read and verify content.
     Assert.assertEquals(
         "{\"foo\":3}",
-        StringUtils.fromUtf8(ByteStreams.toByteArray(new 
ChannelBufferInputStream(request.getContent())))
+        StringUtils.fromUtf8(ByteStreams.toByteArray(new 
ByteBufInputStream(request.getContent())))

Review Comment:
   ## CodeQL / Potential input resource leak
   
   This ByteBufInputStream is not always closed on method exit.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/11296)



##########
server/src/main/java/org/apache/druid/rpc/StandardRetryPolicy.java:
##########
@@ -136,15 +136,15 @@
   @Override
   public boolean retryHttpResponse(final HttpResponse response)
   {
-    final int code = response.getStatus().getCode();
+    final int code = response.getStatus().code();

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



-- 
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