Commit 423fa17
committed
VersionUtils.compare: fix bug with suffixes
When comparing e.g. "1" versus "a", the logic was stripping the "1" as
leading and ultimately comparing "" with "a". This comparison happened
to give the same result, because both "" and "1" compare less than "a",
but for other strings like "%" which comes before the digits, the
behavior differs.1 parent ade6894 commit 423fa17
File tree
2 files changed
+6
-2
lines changed- src
- main/java/org/scijava/util
- test/java/org/scijava/util
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| 156 | + | |
| 157 | + | |
155 | 158 | | |
156 | | - | |
157 | | - | |
| 159 | + | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
0 commit comments