Skip to content

StringValueImpl and RawStringValueImpl does not satisfy equals/hashCode laws #164

@xuwei-k

Description

@xuwei-k

version 0.7.0-p2

val str = "a"
val a1 = ValueFactory.newRawString(str.getBytes("UTF-8"))
val a2 = ValueFactory.newString(str)
println(a1 == a2) // true
println(a1.hashCode) // 128
println(a2.hashCode) // 97

a1.hashCode should be same as a2.hashCode if a1.equals(a2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions