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.
This commit is contained in:
Norman Maurer 2019-04-05 12:09:54 +02:00 committed by GitHub
parent 547a375737
commit 60d135f0c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,10 @@ public class ChannelOption<T> extends AbstractConstant<ChannelOption<T>> {
/** /**
* Creates a new {@link ChannelOption} for the given {@code name} or fail with an * 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. * {@link IllegalArgumentException} if a {@link ChannelOption} for the given {@code name} exists.
*
* @deprecated use {@link #valueOf(String)}.
*/ */
@Deprecated
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <T> ChannelOption<T> newInstance(String name) { public static <T> ChannelOption<T> newInstance(String name) {
return (ChannelOption<T>) pool.newInstance(name); return (ChannelOption<T>) pool.newInstance(name);