Remove methods overridden but identical with the super implementation / Make constructors of abstract classes protected rather than non-sense public
AbstractWrappedByteBuf.capacity(int) should raise a UnsupportedOperationException rather than ReadOnlyBufferException.
This commit is contained in:
parent
d6a0fe54fd
commit
4e0f455e69
@ -32,7 +32,7 @@ public abstract class AbstractWrappedByteBuf extends AbstractByteBuf implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WrappedByteBuf capacity(int newCapacity) {
|
public WrappedByteBuf capacity(int newCapacity) {
|
||||||
throw new ReadOnlyBufferException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -108,11 +108,6 @@ public class DuplicatedByteBuf extends AbstractWrappedByteBuf {
|
|||||||
return buffer.getLong(index);
|
return buffer.getLong(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ByteBuf duplicate() {
|
|
||||||
return new DuplicatedByteBuf(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ByteBuf copy(int index, int length) {
|
public ByteBuf copy(int index, int length) {
|
||||||
return buffer.copy(index, length);
|
return buffer.copy(index, length);
|
||||||
|
@ -37,7 +37,7 @@ public abstract class AbstractDiskHttpData extends AbstractHttpData {
|
|||||||
private boolean isRenamed;
|
private boolean isRenamed;
|
||||||
private FileChannel fileChannel;
|
private FileChannel fileChannel;
|
||||||
|
|
||||||
public AbstractDiskHttpData(String name, Charset charset, long size) {
|
protected AbstractDiskHttpData(String name, Charset charset, long size) {
|
||||||
super(name, charset, size);
|
super(name, charset, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ public abstract class AbstractHttpData implements HttpData {
|
|||||||
protected Charset charset = HttpConstants.DEFAULT_CHARSET;
|
protected Charset charset = HttpConstants.DEFAULT_CHARSET;
|
||||||
protected boolean completed;
|
protected boolean completed;
|
||||||
|
|
||||||
public AbstractHttpData(String name, Charset charset, long size) {
|
protected AbstractHttpData(String name, Charset charset, long size) {
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
throw new NullPointerException("name");
|
throw new NullPointerException("name");
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData {
|
|||||||
private int chunkPosition;
|
private int chunkPosition;
|
||||||
protected boolean isRenamed;
|
protected boolean isRenamed;
|
||||||
|
|
||||||
public AbstractMemoryHttpData(String name, Charset charset, long size) {
|
protected AbstractMemoryHttpData(String name, Charset charset, long size) {
|
||||||
super(name, charset, size);
|
super(name, charset, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ public abstract class WebSocketClientHandshaker {
|
|||||||
* @param maxFramePayloadLength
|
* @param maxFramePayloadLength
|
||||||
* Maximum length of a frame's payload
|
* Maximum length of a frame's payload
|
||||||
*/
|
*/
|
||||||
public WebSocketClientHandshaker(URI webSocketUrl, WebSocketVersion version, String subprotocol,
|
protected WebSocketClientHandshaker(URI webSocketUrl, WebSocketVersion version, String subprotocol,
|
||||||
Map<String, String> customHeaders, int maxFramePayloadLength) {
|
Map<String, String> customHeaders, int maxFramePayloadLength) {
|
||||||
this.webSocketUrl = webSocketUrl;
|
this.webSocketUrl = webSocketUrl;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
expectedSubprotocol = subprotocol;
|
expectedSubprotocol = subprotocol;
|
||||||
|
@ -50,7 +50,7 @@ public abstract class SpdyOrHttpChooser extends ChannelHandlerAdapter implements
|
|||||||
private final int maxSpdyContentLength;
|
private final int maxSpdyContentLength;
|
||||||
private final int maxHttpContentLength;
|
private final int maxHttpContentLength;
|
||||||
|
|
||||||
public SpdyOrHttpChooser(int maxSpdyContentLength, int maxHttpContentLength) {
|
protected SpdyOrHttpChooser(int maxSpdyContentLength, int maxHttpContentLength) {
|
||||||
this.maxSpdyContentLength = maxSpdyContentLength;
|
this.maxSpdyContentLength = maxSpdyContentLength;
|
||||||
this.maxHttpContentLength = maxHttpContentLength;
|
this.maxHttpContentLength = maxHttpContentLength;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user