github-advanced-security[bot] commented on code in PR #19754:
URL: https://github.com/apache/druid/pull/19754#discussion_r3662304668
##########
processing/src/main/java/org/apache/druid/java/util/http/client/netty/HttpClientPipelineFactory.java:
##########
@@ -19,24 +19,22 @@
package org.apache.druid.java.util.http.client.netty;
-import org.jboss.netty.channel.ChannelPipeline;
-import org.jboss.netty.channel.ChannelPipelineFactory;
-import org.jboss.netty.channel.DefaultChannelPipeline;
-import org.jboss.netty.handler.codec.http.HttpClientCodec;
-import org.jboss.netty.handler.codec.http.HttpContentDecompressor;
+import io.netty.channel.ChannelInitializer;
+import io.netty.channel.ChannelPipeline;
+import io.netty.channel.socket.SocketChannel;
+import io.netty.handler.codec.http.HttpClientCodec;
+import io.netty.handler.codec.http.HttpContentDecompressor;
/**
*/
-public class HttpClientPipelineFactory implements ChannelPipelineFactory
+public class HttpClientPipelineFactory extends
ChannelInitializer<SocketChannel>
{
@Override
- public ChannelPipeline getPipeline()
+ protected void initChannel(SocketChannel ch)
{
- ChannelPipeline pipeline = new DefaultChannelPipeline();
+ ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("codec", new HttpClientCodec());
- pipeline.addLast("inflater", new HttpContentDecompressor());
-
- return pipeline;
+ pipeline.addLast("inflater", new HttpContentDecompressor(false));
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [HttpContentDecompressor.HttpContentDecompressor](1) should be
avoided because it has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/11369)
##########
server/src/main/java/org/apache/druid/messages/client/MessageRelayClientImpl.java:
##########
@@ -76,7 +76,7 @@
return FutureUtils.transform(
asyncRequest,
holder -> {
- if (holder.getResponse().getStatus().getCode() ==
HttpStatus.NO_CONTENT_204) {
+ if (holder.getResponse().getStatus().code() ==
HttpStatus.NO_CONTENT_204) {
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/11370)
--
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]