OSDN Git Service

fixed bug: semicolon was not added when select only one node
authorargius <argius.net@gmail.com>
Sun, 26 May 2013 11:53:06 +0000 (20:53 +0900)
committerargius <argius.net@gmail.com>
Sun, 26 May 2013 11:53:06 +0000 (20:53 +0900)
src/net/argius/stew/ui/window/DatabaseInfoTree.java

index 044113f..97b9166 100644 (file)
@@ -215,8 +215,8 @@ final class DatabaseInfoTree extends JTree implements AnyActionListener, TextSea
                 ++c;
             }
         }
-        if (c >= 2) {
-            return String.format("%s;%s", phrase, join(",", nCopies(c, "")));
+        if (c >= 1) {
+            return String.format("%s;%s", phrase, join("", nCopies(c - 1, ",")));
         }
         return phrase;
     }