Commit 097cbb4
committed
VersionUtils.compare: handle SemVer suffixes
With SemVer, 2.0.0 is newer than 2.0.0-beta-1.
We were behaving in the opposite way.
In other words: we want empty post-numeric suffixes to sort _after_
non-empty ones. So we need a special test for empty string here.1 parent 423fa17 commit 097cbb4
File tree
2 files changed
+8
-1
lines changed- src
- main/java/org/scijava/util
- test/java/org/scijava/util
2 files changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments