Skip to content

NullPointerException on null unsafe Comparable implementations #77

@apechinsky

Description

@apechinsky

There is a problem when comparing objects containing null unsafe Comparable imlementing classes.

TestCase:

class SomeObject {
    BigDecimal value;
    SomeObject(BigDecimal value) {
        this.value = value; 
    }
}

// produces NullPointerException
ObjectDifferFactory.getInstance(
    new SomeObject(BigDecimal.ONE), 
    new SomeObject(null));

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions