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:
parent
c4c3acf6fb
commit
6e9a67ae11
@ -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
|
* 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);
|
||||||
|
Loading…
Reference in New Issue
Block a user