From fa4960d9dcb63c96f84fc3aa57c6f4a9660c37cf Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Thu, 26 Jul 2012 16:08:24 -0300 Subject: Fixed broken special parsing. --- api/src/main/java/org/semver/Version.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api/src/main/java') diff --git a/api/src/main/java/org/semver/Version.java b/api/src/main/java/org/semver/Version.java index a6bb770..a878043 100755 --- a/api/src/main/java/org/semver/Version.java +++ b/api/src/main/java/org/semver/Version.java @@ -97,7 +97,9 @@ public final class Version implements Comparable { } else { patch = 0; } - return new Version(major, minor, patch, matcher.group(4), matcher.group(5)); + final String separator = matcher.group(4); + final String special = matcher.group(5); + return new Version(major, minor, patch, separator, "".equals(special) ? null : special); } /** -- cgit v1.2.3