Fix compilation errors

This commit is contained in:
Trustin Lee 2012-05-30 02:01:48 -07:00
parent 78974e85c5
commit 392623749e
5 changed files with 9 additions and 17 deletions

View File

@ -10,15 +10,13 @@ import java.util.Queue;
abstract class AbstractOioMessageChannel extends AbstractOioChannel {
private final ChannelBufferHolder<Object> firstOut = ChannelBufferHolders.messageBuffer();
protected AbstractOioMessageChannel(Channel parent, Integer id) {
super(parent, id);
}
@Override
protected ChannelBufferHolder<Object> firstOut() {
return firstOut;
protected ChannelBufferHolder<?> newOutboundBuffer() {
return ChannelBufferHolders.messageBuffer();
}
@Override

View File

@ -10,16 +10,13 @@ import java.io.IOException;
abstract class AbstractOioStreamChannel extends AbstractOioChannel {
private final ChannelBufferHolder<?> firstOut = ChannelBufferHolders.byteBuffer();
protected AbstractOioStreamChannel(Channel parent, Integer id) {
super(parent, id);
}
@Override
@SuppressWarnings("unchecked")
protected ChannelBufferHolder<Object> firstOut() {
return (ChannelBufferHolder<Object>) firstOut;
protected ChannelBufferHolder<?> newOutboundBuffer() {
return ChannelBufferHolders.byteBuffer();
}
@Override

View File

@ -47,7 +47,6 @@ public class OioDatagramChannel extends AbstractOioMessageChannel
private final MulticastSocket socket;
private final DatagramChannelConfig config;
private final ChannelBufferHolder<Object> out = ChannelBufferHolders.messageBuffer();
private final java.net.DatagramPacket tmpPacket = new java.net.DatagramPacket(EMPTY_DATA, 0);
private static MulticastSocket newSocket() {
@ -103,8 +102,8 @@ public class OioDatagramChannel extends AbstractOioMessageChannel
}
@Override
protected ChannelBufferHolder<Object> firstOut() {
return out;
protected ChannelBufferHolder<?> newOutboundBuffer() {
return ChannelBufferHolders.messageBuffer();
}
@Override

View File

@ -161,7 +161,7 @@ public class OioServerSocketChannel extends AbstractOioMessageChannel
}
@Override
protected ChannelBufferHolder<Object> firstOut() {
protected ChannelBufferHolder<?> newOutboundBuffer() {
return ChannelBufferHolders.discardBuffer();
}

View File

@ -42,7 +42,6 @@ public class OioSocketChannel extends AbstractOioStreamChannel
private final Socket socket;
private final SocketChannelConfig config;
private final ChannelBufferHolder<?> out = ChannelBufferHolders.byteBuffer();
private InputStream is;
private OutputStream os;
@ -96,9 +95,8 @@ public class OioSocketChannel extends AbstractOioStreamChannel
}
@Override
@SuppressWarnings("unchecked")
protected ChannelBufferHolder<Object> firstOut() {
return (ChannelBufferHolder<Object>) out;
protected ChannelBufferHolder<?> newOutboundBuffer() {
return ChannelBufferHolders.byteBuffer();
}
@Override