Skip to content

Commit

Permalink
fix(model): Always construct Hash with lowercase value
Browse files Browse the repository at this point in the history
Lowercasing is not required for comparing expected serialized test
results, because the serialization already takes care of the
lowercasing. However, this change improves when comparing `Hash`
instances via `equals()`.

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Feb 2, 2024
1 parent cf5d3c3 commit 56a81a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/src/main/kotlin/Hash.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ data class Hash(
algorithm = HashAlgorithm.fromString(splitValue.first())
)
} else {
Hash(value, HashAlgorithm.create(value))
Hash(value.lowercase(), HashAlgorithm.create(value))
}
}

Expand Down

0 comments on commit 56a81a5

Please sign in to comment.