Fix hashCode() in Http2StreamChannelId

Motivation:
In `Http2StreamChannelId` a `hashCode()` is not consistent with `equals()`.

Modifications:
Make a `Http2StreamChannelId.hashCode()` consistent with `equals()`.

Result:
Faster hash map's operations where the Http2StreamChannelId as keys.
This commit is contained in:
Nikolay Fedorovskikh 2017-09-08 00:48:35 +05:00 committed by Norman Maurer
parent e404690574
commit de9e666493

View File

@ -56,7 +56,7 @@ final class Http2StreamChannelId implements ChannelId {
@Override
public int hashCode() {
return parentId.hashCode();
return id * 31 + parentId.hashCode();
}
@Override