We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ecb66b1 + 8d939f8 commit 8bc0e75Copy full SHA for 8bc0e75
core/src/jsonrpclib/Payload.scala
@@ -12,17 +12,9 @@ final case class Payload(array: Array[Byte]) {
12
case _ => false
13
}
14
15
- override def hashCode(): Int = {
16
- var hashCode = 0
17
- var i = 0
18
- while (i < array.length) {
19
- hashCode += array(i).hashCode()
20
- i += 1
21
- }
22
- hashCode
23
+ override lazy val hashCode: Int = java.util.Arrays.hashCode(array)
24
25
- override def toString = Base64.getEncoder().encodeToString(array)
+ override def toString = Base64.getEncoder.encodeToString(array)
26
27
object Payload {
28
0 commit comments