AbstractChannel: hashCode() now returns the channel's ID
Requested by @trustin Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
This commit is contained in:
parent
ad7f7a2f25
commit
1e3fe3ffc3
@ -316,12 +316,11 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
|||||||
protected abstract Unsafe newUnsafe();
|
protected abstract Unsafe newUnsafe();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@linkplain System#identityHashCode(Object) identity hash code}
|
* Returns the ID of this channel.
|
||||||
* of this channel.
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return System.identityHashCode(this);
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user