Skip to content

TextNode.equals() throws NullPointerException when TextNode constructed with null #4378

@Javed6234

Description

@Javed6234

Search before asking

  • I searched in the issues and found nothing similar.

Describe the bug

new TextNode(null) == new TextNode(null) returns false.
When debugging this issue, it actually causes an NPE in TextNode's equals method.

Version Information

Version: 2.13.5
Java 11
Spring Boot: 2.5.15

Reproduction

TextNode nodeOne = new TextNode(null);
TextNode nodeTwo = new TextNode(null);
nodeOne.equals(nodeTwo);

Expected behavior

I would expect this to return true as both values are equal

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions