AUTO_CLOSE should not be marked as deprecated. (#7967)

Motivation:

A long time ago we deprecated AUTO_CLOSE but it turned out this feature is still useful because if a write error is detected there still maybe data to read, and if we close the channel automatically we will lose data

Modifications:

- Remove `@Deprecated` tag for AUTO_CLOSE, setAutoClose(...) and isAutoClose(...)
- Fix javadocs on ChannelConfig to correctly tell the default value of AUTO_CLOSE.

Result:

Less warnings.
This commit is contained in:
Norman Maurer 2018-05-24 21:25:30 +02:00 committed by GitHub
parent 030318e53c
commit c3637ff42c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 11 deletions

View File

@ -195,21 +195,15 @@ public interface ChannelConfig {
ChannelConfig setAutoRead(boolean autoRead);
/**
* @deprecated Auto close will be removed in a future release.
*
* Returns {@code true} if and only if the {@link Channel} will be closed automatically and immediately on
* write failure. The default is {@code false}.
* write failure. The default is {@code true}.
*/
@Deprecated
boolean isAutoClose();
/**
* @deprecated Auto close will be removed in a future release.
*
* Sets whether the {@link Channel} should be closed automatically and immediately on write failure.
* The default is {@code false}.
* The default is {@code true}.
*/
@Deprecated
ChannelConfig setAutoClose(boolean autoClose);
/**

View File

@ -99,12 +99,9 @@ public class ChannelOption<T> extends AbstractConstant<ChannelOption<T>> {
public static final ChannelOption<Boolean> AUTO_READ = valueOf("AUTO_READ");
/**
* @deprecated Auto close will be removed in a future release.
*
* If {@code true} then the {@link Channel} is closed automatically and immediately on write failure.
* The default value is {@code true}.
*/
@Deprecated
public static final ChannelOption<Boolean> AUTO_CLOSE = valueOf("AUTO_CLOSE");
public static final ChannelOption<Boolean> SO_BROADCAST = valueOf("SO_BROADCAST");