diff --git a/src/fr/devinsy/util/strings/StringSet.java b/src/fr/devinsy/util/strings/StringSet.java index 4d12790..d4e10b5 100644 --- a/src/fr/devinsy/util/strings/StringSet.java +++ b/src/fr/devinsy/util/strings/StringSet.java @@ -190,7 +190,14 @@ public class StringSet extends HashSet { StringSet result; - String merge = this.toString(); + StringBuffer buffer = new StringBuffer(length()); + + for (String string : this) + { + buffer.append(string); + } + + String merge = buffer.toString(); clear(); add(merge); @@ -382,14 +389,7 @@ public class StringSet extends HashSet { String result; - StringBuffer buffer = new StringBuffer(length()); - - for (String string : this) - { - buffer.append(string); - } - - result = buffer.toString(); + result = toStringList().toStringWithCommas(); // return result;