Skip to content

Commit 6fb2e00

Browse files
committed
Use DecoderResultProvider#decoderResult, as HttpObject#decoderResult is deprecated
1 parent d5a0f20 commit 6fb2e00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client/src/main/java/org/asynchttpclient/netty/handler/HttpHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import io.netty.buffer.ByteBuf;
1717
import io.netty.channel.Channel;
1818
import io.netty.channel.ChannelHandler.Sharable;
19+
import io.netty.handler.codec.DecoderResultProvider;
1920
import io.netty.handler.codec.http.*;
2021
import org.asynchttpclient.AsyncHandler;
2122
import org.asynchttpclient.AsyncHandler.State;
@@ -125,8 +126,8 @@ public void handleRead(final Channel channel, final NettyResponseFuture<?> futur
125126

126127
AsyncHandler<?> handler = future.getAsyncHandler();
127128
try {
128-
if (e instanceof HttpObject) {
129-
HttpObject object = (HttpObject) e;
129+
if (e instanceof DecoderResultProvider) {
130+
DecoderResultProvider object = (DecoderResultProvider) e;
130131
Throwable t = object.decoderResult().cause();
131132
if (t != null) {
132133
readFailed(channel, future, t);

0 commit comments

Comments
 (0)