From 60d135f0c88abacc86c10d6743eb41dc8e4a6a2e Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 5 Apr 2019 12:09:54 +0200 Subject: [PATCH] Deprecate ChannelOption.newInstance(...) (#8997) Motivation: Deprecate ChannelOption.newInstance(...) as it is not used. Modifications: Deprecate ChannelOption.newInstance(...) as valueOf(...) should be used as a replacement. Result: Fixes https://github.com/netty/netty/issues/8983. --- transport/src/main/java/io/netty/channel/ChannelOption.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transport/src/main/java/io/netty/channel/ChannelOption.java b/transport/src/main/java/io/netty/channel/ChannelOption.java index 97bf31545c..274d8f0d31 100644 --- a/transport/src/main/java/io/netty/channel/ChannelOption.java +++ b/transport/src/main/java/io/netty/channel/ChannelOption.java @@ -65,7 +65,10 @@ public class ChannelOption extends AbstractConstant> { /** * Creates a new {@link ChannelOption} for the given {@code name} or fail with an * {@link IllegalArgumentException} if a {@link ChannelOption} for the given {@code name} exists. + * + * @deprecated use {@link #valueOf(String)}. */ + @Deprecated @SuppressWarnings("unchecked") public static ChannelOption newInstance(String name) { return (ChannelOption) pool.newInstance(name);