Skip to content

Commit

Permalink
devonfw#1019: support spaces in RangeVersion expression, and add corr…
Browse files Browse the repository at this point in the history
…esponding unit test (devonfw#1020)
  • Loading branch information
yurii-yu authored Feb 6, 2025
1 parent 62fa12b commit 9c40fee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ public static VersionRange of(String value) {
max = min;
} else {
String minString = value.substring(0, index);
if (!minString.isEmpty()) {
if (!minString.isBlank()) {
min = VersionIdentifier.of(minString);
}
String maxString = value.substring(index + 1);
if (!maxString.isEmpty()) {
if (!maxString.isBlank()) {
max = VersionIdentifier.of(maxString);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public void testOf() {
checkVersionRange("[1.2,3]", "1.2", "3", BoundaryType.CLOSED);
checkVersionRange("1,)", "1", null, BoundaryType.RIGHT_OPEN);
checkVersionRange("[1,)", "1", null, BoundaryType.RIGHT_OPEN);
checkVersionRange("[1, )", "1", null, BoundaryType.RIGHT_OPEN);
checkVersionRange("(1.2,3.4", "1.2", "3.4", BoundaryType.LEFT_OPEN);
checkVersionRange("(1.2,3.4]", "1.2", "3.4", BoundaryType.LEFT_OPEN);
checkVersionRange("1.2,3.4)", "1.2", "3.4", BoundaryType.RIGHT_OPEN);
Expand Down

0 comments on commit 9c40fee

Please sign in to comment.