Skip to content

Commit

Permalink
Fix null pointer when comparing null pre release types in VersionData
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Nov 13, 2023
1 parent d058bb7 commit 95b4543
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public int compareTo(@NotNull VersionData o) {
if (patchComp != 0) {
return patchComp;
}
if (this.preReleaseType == null && o.preReleaseType == null) {
return 0;
}
if (this.preReleaseType == null) {
return 1;
}
return this.preReleaseType.compareTo(o.preReleaseType);
}
}
Expand Down

0 comments on commit 95b4543

Please sign in to comment.