Skip to content

Shadow contains incorrect value for initialized boolean field #1014

@andreiamariei

Description

@andreiamariei

Description
If a Java class initializes a boolean field to true, the shadows found for this class will contain the initialized value even when the original object had the field set to false (value I expected in the shadows too).

It seems it behaves correctly for Groovy classes though.

Steps To Reproduce
I have a runnable test case which isolates the bug and allows Javers Core Team to easily reproduce it. I have pushed this test case to my fork of this repository:

https://github.com/andreiamariei/javers/blob/issue/shadow-of-class-with-boolean-field-initialized/javers-core/src/test/java/org/javers/core/cases/CaseShadowWithInitializedPrimitiveBooleanField.java#L16

Javers' Version
5.11.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions