Skip to content

ResolvedKeySpacePath.equals/hashCode sometimes are reference equality, and differ #3594

@ScottDugas

Description

@ScottDugas

ResolvedKeySpacePath.equals/hashCode do not correctly the handle the fact that the Objects might be byte[], so Objects.equals is reference equality, which is not desired.
In addition, the hashCode uses the PathValue, while equals uses the value. Also, PathValue does not implement equals or hashCode at all, so two ResolvedKeySpacePaths can be equals but have different hashCodes, breaking the contract.

We should fix this up so that equals is sensible, and both those methods follow the contract.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions