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:
Cruz Julian Bishop 2012-08-25 13:36:34 +10:00
parent ad7f7a2f25
commit 1e3fe3ffc3

View File

@ -316,12 +316,11 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
protected abstract Unsafe newUnsafe();
/**
* Returns the {@linkplain System#identityHashCode(Object) identity hash code}
* of this channel.
* Returns the ID of this channel.
*/
@Override
public final int hashCode() {
return System.identityHashCode(this);
return this.id;
}
/**