From a4010f7dc80c762093db34d6e618b59b7ca4a610 Mon Sep 17 00:00:00 2001 From: low012 Date: Sun, 11 Nov 2007 21:42:50 +0000 Subject: [PATCH] *) fixed bug where dots were added after numbers < 1000: "123" was transformed to "123." which is undesirable git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4206 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaGrafics.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/de/anomic/plasma/plasmaGrafics.java b/source/de/anomic/plasma/plasmaGrafics.java index 5693ff05e..2be362aae 100644 --- a/source/de/anomic/plasma/plasmaGrafics.java +++ b/source/de/anomic/plasma/plasmaGrafics.java @@ -425,16 +425,18 @@ public class plasmaGrafics { private static String addDots(String word) { String tmp = ""; int len = word.length(); - while(len > 3) { - if(tmp.equals("")) { - tmp = word.substring(len-3,len); - } else { - tmp = word.substring(len-3,len) + "." + tmp; + if (len > 3) { + while(len > 3) { + if(tmp.equals("")) { + tmp = word.substring(len-3,len); + } else { + tmp = word.substring(len-3,len) + "." + tmp; + } + word = word.substring(0,len-3); + len = word.length(); } - word = word.substring(0,len-3); - len = word.length(); + word = word + "." + tmp; } - word = word + "." + tmp; return word; }