SPDY: replace exception in SpdyHeaderBlockZlibEncoder with EMPTY_BUFFER

This commit is contained in:
Jeff Pinner 2013-06-17 20:53:57 -07:00 committed by Trustin Lee
parent a969613540
commit c86155e4d4
2 changed files with 3 additions and 2 deletions

View File

@ -103,7 +103,7 @@ class SpdyHeaderBlockJZlibEncoder extends SpdyHeaderBlockRawEncoder {
}
if (finished) {
throw new IllegalAccessException("compressor closed");
return Unpooled.EMPTY_BUFFER;
}
ByteBuf decompressed = super.encode(frame);

View File

@ -62,8 +62,9 @@ class SpdyHeaderBlockZlibEncoder extends SpdyHeaderBlockRawEncoder {
if (frame == null) {
throw new IllegalArgumentException("frame");
}
if (finished) {
throw new IllegalAccessException("compressor closed");
return Unpooled.EMPTY_BUFFER;
}
ByteBuf decompressed = super.encode(frame);