Skip to content

equals works incorrectly for Java Records if some fields are initialized with null #10293

Description

@foal

If some fields in java record are initialized with null the equals return false.

public record A(String v) {}
boolean equals1 = new A("A").equals(new A("A"));
boolean equals2 = new A(null).equals(new A(null));

Both equals1 and equals2 have to be true but equals2 is false

GWT 2.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions