diff --git a/source/net/yacy/peers/operation/yacyVersion.java b/source/net/yacy/peers/operation/yacyVersion.java index edc1f299a..b9bd56e68 100644 --- a/source/net/yacy/peers/operation/yacyVersion.java +++ b/source/net/yacy/peers/operation/yacyVersion.java @@ -16,7 +16,7 @@ public class yacyVersion implements Comparator, Comparable, Comparable 2) { try { - this.svn = Integer.parseInt(comp[2]); + this.svn = Long.parseLong(comp[2]); this.git = ""; } catch (final NumberFormatException e) { // this is not a number, so it is a new release name using an git version hash - this.svn = 0; + // to have an easy way to compare versions constructed that way, we make a fake svn number using the date + this.svn = Long.parseLong(this.dateStamp); this.git = comp[2]; } } else { - this.svn = 0; // we migrate to git + this.svn = 0L; // we migrate to git this.git = ""; } // finished! we parsed a relase string @@ -110,7 +111,7 @@ public class yacyVersion implements Comparator, Comparable, Comparable, Comparable 0.0d) d = d / 10000.0d; // long numbers constructed from dates which are four more digits long + return this.getReleaseNr() + d; } public String getName() {