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
parent c4c3acf6fb
commit 6e9a67ae11

View File

@ -67,7 +67,10 @@ public class ChannelOption<T> extends AbstractConstant<ChannelOption<T>> {
/**
* 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 <T> ChannelOption<T> newInstance(String name) {
return (ChannelOption<T>) pool.newInstance(name);