From 0f82fb36283eb8114e1e7ab66c5d7d8248cdba4c Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 30 May 2012 15:28:20 +0200 Subject: [PATCH] using double instead float for a better release ordering --- .../net/yacy/peers/operation/yacyRelease.java | 6 +++--- .../net/yacy/peers/operation/yacyVersion.java | 20 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/source/net/yacy/peers/operation/yacyRelease.java b/source/net/yacy/peers/operation/yacyRelease.java index d4d88c40f..eb69c65e1 100644 --- a/source/net/yacy/peers/operation/yacyRelease.java +++ b/source/net/yacy/peers/operation/yacyRelease.java @@ -143,7 +143,7 @@ public final class yacyRelease extends yacyVersion { // return a dev-release or a main-release if ((latestdev != null) && ((latestmain == null) || (latestdev.compareTo(latestmain) > 0)) && - (!(Float.toString(latestdev.getReleaseNr()).matches(blacklist)))) { + (!(Double.toString(latestdev.getReleaseNr()).matches(blacklist)))) { // consider a dev-release if (latestdev.compareTo(thisVersion()) <= 0) { Network.log.logInfo( @@ -155,7 +155,7 @@ public final class yacyRelease extends yacyVersion { } if (latestmain != null) { // consider a main release - if ((Float.toString(latestmain.getReleaseNr()).matches(blacklist))) { + if ((Double.toString(latestmain.getReleaseNr()).matches(blacklist))) { Network.log.logInfo( "rulebasedUpdateInfo: latest dev " + (latestdev == null ? "null" : latestdev.getName()) + " matches with blacklist '" + blacklist + "'"); @@ -172,7 +172,7 @@ public final class yacyRelease extends yacyVersion { } if ((concept.equals("main")) && (latestmain != null)) { // return a main-release - if ((Float.toString(latestmain.getReleaseNr()).matches(blacklist))) { + if ((Double.toString(latestmain.getReleaseNr()).matches(blacklist))) { Network.log.logInfo( "rulebasedUpdateInfo: latest main " + latestmain.getName() + " matches with blacklist'" + blacklist + "'"); diff --git a/source/net/yacy/peers/operation/yacyVersion.java b/source/net/yacy/peers/operation/yacyVersion.java index ba802026a..4b1f3bf88 100644 --- a/source/net/yacy/peers/operation/yacyVersion.java +++ b/source/net/yacy/peers/operation/yacyVersion.java @@ -21,7 +21,7 @@ public class yacyVersion implements Comparator, Comparable, Comparable, Comparable, Comparable, Comparable, Comparable