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:
parent
e404690574
commit
de9e666493
@ -56,7 +56,7 @@ final class Http2StreamChannelId implements ChannelId {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return parentId.hashCode();
|
||||
return id * 31 + parentId.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user