aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/main
diff options
context:
space:
mode:
authorJulien Eluard <[email protected]>2012-07-26 16:08:24 -0300
committerJulien Eluard <[email protected]>2012-07-26 16:08:24 -0300
commitfa4960d9dcb63c96f84fc3aa57c6f4a9660c37cf (patch)
treea1c3bd6d89a85dfdcd3c04cafd89e924312def4e /api/src/main
parentb2b9849f93adf45937d782d781756ad21819042a (diff)
Fixed broken special parsing.
Diffstat (limited to 'api/src/main')
-rwxr-xr-xapi/src/main/java/org/semver/Version.java4
1 files changed, 3 insertions, 1 deletions
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<Version> {
} 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);
}
/**