deprecate own ConcurrentSet for removal (#8340)

Motivation:

Java since version 6 has the wrapper for the ConcurrentHashMap that could be created via Collections.newSetFromMap(map). So no need to create own ConcurrentSet class. Also, since netty plans to switch to Java 8 soon there is another method for that - ConcurrentHashMap.newKeySet().
For now, marking this class @deprecated would be enough, just to warn users who use netty's ConcurrentSet. After switching to Java 8 ConcurrentSet should be removed and replaced with ConcurrentHashMap.newKeySet().

Modification:

ConcurrentSet deprecated.
This commit is contained in:
Dmitriy Dumanskiy 2018-10-15 20:36:05 +03:00 committed by Norman Maurer
parent a542d4d78b
commit b59336142f

View File

@ -20,6 +20,10 @@ import java.util.AbstractSet;
import java.util.Iterator;
import java.util.concurrent.ConcurrentMap;
/**
* @deprecated For removal in Netty 4.2. Please use {@link ConcurrentHashMap#newKeySet()} instead
*/
@Deprecated
public final class ConcurrentSet<E> extends AbstractSet<E> implements Serializable {
private static final long serialVersionUID = -6761513279741915432L;