Skip to content

Commit

Permalink
Bug 564580: made Java11 compatible
Browse files Browse the repository at this point in the history
Change-Id: Ia5ce65b1502fa2b5a6599c50e1f78d2ec1ace212
Signed-off-by: Leif Geiger <leif.geiger@yatta.de>
  • Loading branch information
l3-g5 committed Jul 9, 2020
1 parent b51415f commit 283241e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static String formatVersion(String version) {
String[] parts = version.split("[\\._\\-]", 4); //$NON-NLS-1$
String shortVersion = Arrays.stream(parts)
.limit(3)
.map(part -> part == null || part.isBlank() ? "0" : part) //$NON-NLS-1$
.map(part -> part == null || part.trim().isEmpty() ? "0" : part) //$NON-NLS-1$
.collect(Collectors.joining(".")); //$NON-NLS-1$
return shortVersion;
}
Expand Down

0 comments on commit 283241e

Please sign in to comment.