From 7301bd03574c879e3fed2f32b155a6732dbcfcf5 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 20 May 2015 07:35:50 +0000 Subject: [PATCH] * fix --- source/net/filebot/media/MediaDetection.java | 2 +- source/net/filebot/util/StringUtilities.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index 039f79aa..0c4d4ef6 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -947,7 +947,7 @@ public class MediaDetection { querySet = getUniqueQuerySet(stripBlacklistedTerms(querySet)); // DEBUG - System.out.format("Query %s: %s%n", queryLookupService.getName(), querySet); + // System.out.format("Query %s: %s%n", queryLookupService.getName(), querySet); final Map probabilityMap = new LinkedHashMap(); final SimilarityMetric metric = getMovieMatchMetric(); diff --git a/source/net/filebot/util/StringUtilities.java b/source/net/filebot/util/StringUtilities.java index b967a913..4fb4a13b 100644 --- a/source/net/filebot/util/StringUtilities.java +++ b/source/net/filebot/util/StringUtilities.java @@ -27,10 +27,9 @@ public final class StringUtilities { public static String join(Iterable values, CharSequence delimiter, CharSequence start, CharSequence end) { StringBuilder sb = new StringBuilder().append(start); - for (Iterator iterator = values.iterator(); iterator.hasNext();) { - Object value = iterator.next(); + for (Object value : values) { if (!isEmpty(value)) { - if (sb.length() > 0) { + if (sb.length() > start.length()) { sb.append(delimiter); } sb.append(value);