Skip to content

Concrete Change classes: implement structural equality #384

@mfulton26

Description

@mfulton26

I'm using JaVers to compare two objects in a test. I have some expected changes that I want to remove from the list of changes but ValueChange et. al. do not override the default hashCode/equals so I can't use convenient List methods like in change.removeAll(expectedChanges) after which I would assert that the list of changes is empty.

I took a look at ValueChange and some other concrete Change classes and from what I can tell GlobalId, Atomic, etc. all override the default hashCode/equals.

Can ValueChange et. al. be updated to also support structural equality instead of referential equality (default hashCode/equals)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions