Fix a test failure

This commit is contained in:
Trustin Lee 2012-06-04 12:14:42 -07:00
parent 4630905b92
commit 36dbbc4867

View File

@ -16,6 +16,7 @@
package io.netty.channel; package io.netty.channel;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.local.LocalChannel; import io.netty.channel.local.LocalChannel;
import org.junit.Test; import org.junit.Test;
@ -47,7 +48,11 @@ public class DefaultChannelPipelineTest {
} }
private static ChannelHandler newHandler() { private static ChannelHandler newHandler() {
return new ChannelHandlerAdapter<Byte, Byte>() { return new TestHandler();
}
@Sharable
private static class TestHandler extends ChannelHandlerAdapter<Byte, Byte> {
@Override @Override
public ChannelBufferHolder<Byte> newInboundBuffer( public ChannelBufferHolder<Byte> newInboundBuffer(
ChannelInboundHandlerContext<Byte> ctx) throws Exception { ChannelInboundHandlerContext<Byte> ctx) throws Exception {
@ -60,5 +65,4 @@ public class DefaultChannelPipelineTest {
return ChannelBufferHolders.byteBuffer(); return ChannelBufferHolders.byteBuffer();
} }
}; };
}
} }