From 5d88c423dfa458d82fd2c12083307507b163a32f Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Mon, 1 Jul 2013 08:53:02 +0200 Subject: [PATCH] [#1500] Remove @deprecated methods --- .../java/io/netty/buffer/AbstractByteBuf.java | 18 ------------------ .../main/java/io/netty/buffer/ByteBuf.java | 18 ------------------ .../java/io/netty/buffer/EmptyByteBuf.java | 18 ------------------ .../java/io/netty/buffer/SwappedByteBuf.java | 19 ------------------- .../io/netty/buffer/UnreleasableByteBuf.java | 19 ------------------- .../websocketx/WebSocketServerHandshaker.java | 5 ----- .../io/netty/bootstrap/AbstractBootstrap.java | 14 -------------- .../io/netty/bootstrap/ServerBootstrap.java | 10 ---------- 8 files changed, 121 deletions(-) diff --git a/buffer/src/main/java/io/netty/buffer/AbstractByteBuf.java b/buffer/src/main/java/io/netty/buffer/AbstractByteBuf.java index 72bbe49e96..f41ca9b209 100644 --- a/buffer/src/main/java/io/netty/buffer/AbstractByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/AbstractByteBuf.java @@ -116,12 +116,6 @@ public abstract class AbstractByteBuf implements ByteBuf { return writerIndex > readerIndex; } - @Override - @Deprecated - public final boolean readable() { - return isReadable(); - } - @Override public boolean isReadable(int numBytes) { return writerIndex - readerIndex >= numBytes; @@ -132,12 +126,6 @@ public abstract class AbstractByteBuf implements ByteBuf { return capacity() > writerIndex; } - @Override - @Deprecated - public final boolean writable() { - return isWritable(); - } - @Override public boolean isWritable(int numBytes) { return capacity() - writerIndex >= numBytes; @@ -264,12 +252,6 @@ public abstract class AbstractByteBuf implements ByteBuf { return this; } - @Override - @Deprecated - public final ByteBuf ensureWritableBytes(int minWritableBytes) { - return ensureWritable(minWritableBytes); - } - @Override public int ensureWritable(int minWritableBytes, boolean force) { if (minWritableBytes < 0) { diff --git a/buffer/src/main/java/io/netty/buffer/ByteBuf.java b/buffer/src/main/java/io/netty/buffer/ByteBuf.java index 1c669c5d8b..84f9d86184 100644 --- a/buffer/src/main/java/io/netty/buffer/ByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/ByteBuf.java @@ -396,12 +396,6 @@ public interface ByteBuf extends ReferenceCounted, Comparable { */ boolean isReadable(int size); - /** - * @deprecated Use {@link #isReadable()} or {@link #isReadable(int)} instead. - */ - @Deprecated - boolean readable(); - /** * Returns {@code true} * if and only if {@code (this.capacity - this.writerIndex)} is greater @@ -415,12 +409,6 @@ public interface ByteBuf extends ReferenceCounted, Comparable { */ boolean isWritable(int size); - /** - * @deprecated Use {@link #isWritable()} or {@link #isWritable(int)} instead. - */ - @Deprecated - boolean writable(); - /** * Sets the {@code readerIndex} and {@code writerIndex} of this buffer to * {@code 0}. @@ -499,12 +487,6 @@ public interface ByteBuf extends ReferenceCounted, Comparable { */ ByteBuf ensureWritable(int minWritableBytes); - /** - * @deprecated Use {@link #ensureWritable(int)} instead. - */ - @Deprecated - ByteBuf ensureWritableBytes(int minWritableBytes); - /** * Tries to make sure the number of {@linkplain #writableBytes() the writable bytes} * is equal to or greater than the specified value. Unlike {@link #ensureWritable(int)}, diff --git a/buffer/src/main/java/io/netty/buffer/EmptyByteBuf.java b/buffer/src/main/java/io/netty/buffer/EmptyByteBuf.java index 644142dff1..9a2876c953 100644 --- a/buffer/src/main/java/io/netty/buffer/EmptyByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/EmptyByteBuf.java @@ -167,23 +167,11 @@ public final class EmptyByteBuf implements ByteBuf { return false; } - @Override - @Deprecated - public boolean readable() { - return false; - } - @Override public boolean isWritable() { return false; } - @Override - @Deprecated - public boolean writable() { - return false; - } - @Override public ByteBuf clear() { return this; @@ -230,12 +218,6 @@ public final class EmptyByteBuf implements ByteBuf { return this; } - @Override - @Deprecated - public ByteBuf ensureWritableBytes(int minWritableBytes) { - return ensureWritable(minWritableBytes); - } - @Override public int ensureWritable(int minWritableBytes, boolean force) { if (minWritableBytes < 0) { diff --git a/buffer/src/main/java/io/netty/buffer/SwappedByteBuf.java b/buffer/src/main/java/io/netty/buffer/SwappedByteBuf.java index db5c993d36..d9cb256547 100644 --- a/buffer/src/main/java/io/netty/buffer/SwappedByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/SwappedByteBuf.java @@ -136,12 +136,6 @@ public final class SwappedByteBuf implements ByteBuf { return buf.isReadable(); } - @Override - @Deprecated - public boolean readable() { - return buf.isReadable(); - } - @Override public boolean isReadable(int size) { return buf.isReadable(size); @@ -152,12 +146,6 @@ public final class SwappedByteBuf implements ByteBuf { return buf.isWritable(); } - @Override - @Deprecated - public boolean writable() { - return buf.isWritable(); - } - @Override public boolean isWritable(int size) { return buf.isWritable(size); @@ -211,13 +199,6 @@ public final class SwappedByteBuf implements ByteBuf { return this; } - @Override - @Deprecated - public ByteBuf ensureWritableBytes(int minWritableBytes) { - buf.ensureWritable(minWritableBytes); - return this; - } - @Override public int ensureWritable(int minWritableBytes, boolean force) { return buf.ensureWritable(minWritableBytes, force); diff --git a/buffer/src/main/java/io/netty/buffer/UnreleasableByteBuf.java b/buffer/src/main/java/io/netty/buffer/UnreleasableByteBuf.java index 9d5a781cf1..0ab89f3654 100644 --- a/buffer/src/main/java/io/netty/buffer/UnreleasableByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/UnreleasableByteBuf.java @@ -152,23 +152,11 @@ final class UnreleasableByteBuf implements ByteBuf { return buf.isReadable(); } - @Override - @Deprecated - public boolean readable() { - return buf.readable(); - } - @Override public boolean isWritable() { return buf.isWritable(); } - @Override - @Deprecated - public boolean writable() { - return buf.writable(); - } - @Override public ByteBuf clear() { buf.clear(); @@ -217,13 +205,6 @@ final class UnreleasableByteBuf implements ByteBuf { return this; } - @Override - @Deprecated - public ByteBuf ensureWritableBytes(int minWritableBytes) { - buf.ensureWritableBytes(minWritableBytes); - return this; - } - @Override public int ensureWritable(int minWritableBytes, boolean force) { return buf.ensureWritable(minWritableBytes, force); diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java index 2a24cfca55..1d7b2d24c5 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java @@ -262,11 +262,6 @@ public abstract class WebSocketServerHandshaker { return selectedSubprotocol; } - @Deprecated - protected void setSelectedSubprotocol(String value) { - selectedSubprotocol = value; - } - /** * Returns the decoder to use after handshake is complete. */ diff --git a/transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java b/transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java index 9565274561..67e5d3777e 100644 --- a/transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java +++ b/transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java @@ -188,20 +188,6 @@ abstract class AbstractBootstrap, C extends Ch return b; } - /** - * @deprecated Use {@link EventLoopGroup#shutdown()} instead. - * - * Shutdown the {@link AbstractBootstrap} and the {@link EventLoopGroup} which is - * used by it. Only call this if you don't share the {@link EventLoopGroup} - * between different {@link AbstractBootstrap}'s. - */ - @Deprecated - public void shutdown() { - if (group != null) { - group.shutdown(); - } - } - /** * Validate all the parameters. Sub-classes may override this, but should * call the super method in that case. diff --git a/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java b/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java index db9bccdcb9..1b9d1f66ed 100644 --- a/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java +++ b/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java @@ -184,16 +184,6 @@ public final class ServerBootstrap extends AbstractBootstrap