changeset 237:23ec48ce717e

Possible fix for flys/issue8 artifacts/trunk@1650 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 06 Apr 2011 16:49:14 +0000
parents 6ef6acf30d66
children 61b7041204a7
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/StringUtils.java
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Apr 06 08:40:24 2011 +0000
+++ b/ChangeLog	Wed Apr 06 16:49:14 2011 +0000
@@ -1,3 +1,12 @@
+2011-04-04	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+    Possible fix for flys/issue8
+
+    * artifact-database/src/main/java/de/intevation/artifactdatabase/StringUtils.java:
+      (repeat) The term was repeated one time too often leading to invalid
+      SQL statements in database cleaner. I really should start writing 
+      unit tests.
+
 2011-04-06  Ingo Weinzierl <ingo@intevation.de>
 
 	* artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultCollectionItem.java:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/StringUtils.java	Wed Apr 06 08:40:24 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/StringUtils.java	Wed Apr 06 16:49:14 2011 +0000
@@ -87,7 +87,7 @@
             return "";
         }
         StringBuilder sb = new StringBuilder(s);
-        for (--count; count >= 0; --count) {
+        for (--count; count > 0; --count) {
             sb.append(sep).append(s);
         }
         return sb.toString();
@@ -98,7 +98,7 @@
             return "";
         }
         StringBuilder sb = new StringBuilder(2*count-1).append(c);
-        for (--count; count >= 0; --count) {
+        for (--count; count > 0; --count) {
             sb.append(sep).append(c);
         }
         return sb.toString();

http://dive4elements.wald.intevation.org