From 3d6819623efc2f634009094ac8cf6a362fd3c2c1 Mon Sep 17 00:00:00 2001 From: nmittler Date: Mon, 20 Jul 2015 12:44:52 -0700 Subject: [PATCH] Fixing NPE in StreamBufferingEncoderTest Motivation: The bufferingNewStreamFailsAfterGoAwayReceived method currently causes an NPE. Modifications: Fixed the test so that a valid ByteBuf is passed in. Result: The test no longer throws an NPE. --- .../netty/handler/codec/http2/StreamBufferingEncoderTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec-http2/src/test/java/io/netty/handler/codec/http2/StreamBufferingEncoderTest.java b/codec-http2/src/test/java/io/netty/handler/codec/http2/StreamBufferingEncoderTest.java index ed3c884395..00dcef9366 100644 --- a/codec-http2/src/test/java/io/netty/handler/codec/http2/StreamBufferingEncoderTest.java +++ b/codec-http2/src/test/java/io/netty/handler/codec/http2/StreamBufferingEncoderTest.java @@ -204,7 +204,7 @@ public class StreamBufferingEncoderTest { public void bufferingNewStreamFailsAfterGoAwayReceived() { encoder.writeSettingsAck(ctx, promise); setMaxConcurrentStreams(0); - connection.goAwayReceived(1, 8, null); + connection.goAwayReceived(1, 8, EMPTY_BUFFER); promise = mock(ChannelPromise.class); encoderWriteHeaders(3, promise);