Skip to content

Commit

Permalink
fix for [B@...
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5941 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
borg-0300 committed May 10, 2009
1 parent b6ba387 commit 21930d0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions source/de/anomic/kelondro/util/SetTools.java
@@ -1,10 +1,14 @@
// kelondroMSetTools.java
// kelondroMSetTools.java
// -------------------------------------
// (C) by Michael Peter Christen; mc@yacy.net
// first published on http://www.anomic.de
// Frankfurt, Germany, 2004
// last major change: 28.12.2004
//
// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -420,15 +424,15 @@ public static TreeSet<String> loadList(final File file, final Comparator<String>
}
return list;
}

public static String setToString(final TreeSet<byte[]> set, final char separator) {
final Iterator<byte[]> i = set.iterator();
final StringBuilder sb = new StringBuilder(set.size() * 7);
if (i.hasNext()) sb.append(new String(i.next()));
while (i.hasNext()) {
sb.append(separator).append(new String(i.next()));
}
return new String(sb);
return sb.toString();
}
public static String setToString(final Set<String> set, final char separator) {
final Iterator<String> i = set.iterator();
Expand All @@ -437,9 +441,9 @@ public static String setToString(final Set<String> set, final char separator) {
while (i.hasNext()) {
sb.append(separator).append(i.next());
}
return new String(sb);
return sb.toString();
}

// ------------------------------------------------------------------------------------------------


Expand Down

0 comments on commit 21930d0

Please sign in to comment.