Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compare head version of ObjectVersionId #110

Closed
Mewel opened this issue Apr 4, 2024 · 2 comments · Fixed by #111
Closed

Cannot compare head version of ObjectVersionId #110

Mewel opened this issue Apr 4, 2024 · 2 comments · Fixed by #111

Comments

@Mewel
Copy link
Contributor

Mewel commented Apr 4, 2024

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 added a commit to pwinckles/ocfl-java that referenced this issue Apr 6, 2024
`ObjectVersionId.equals()` no longer throws an NPE when comparing HEAD
versions.

Resolves OCFL#110
pwinckles added a commit that referenced this issue Apr 6, 2024
`ObjectVersionId.equals()` no longer throws an NPE when comparing HEAD
versions.

Resolves #110
@pwinckles
Copy link
Collaborator

@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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants