OCFL / ocfl-java

A Java OCFL implementation
MIT License
16 stars 12 forks source link

Cannot compare head version of ObjectVersionId #110

Closed Mewel closed 3 months ago

Mewel commented 3 months ago

Comparing the head version of ObjectVersionId leads to a NPE. ObjectVersionId#equals() should check versionNum for null values.

@Test
public void equalsVersionId() {
    assertEquals(ObjectVersionId.head("a"), ObjectVersionId.head("a"));
    assertNotEquals(ObjectVersionId.head("a"), ObjectVersionId.head("b"));
}
pwinckles commented 3 months ago

@Mewel Thanks for the report! It's fixed in main. I'm not going to cut an immediate point-release though because I'm hoping to do a larger release sometime this coming week.

pwinckles commented 2 months ago

This is fixed in the 2.1.0 release that I just pushed out