From 536a8c3a3a258a3fc43fb1696757c57bedff434c Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 16 Sep 2016 13:28:02 +0800 Subject: [PATCH] Fix --conflict auto issue (PROPER/REPACK) @see https://www.filebot.net/forums/viewtopic.php?f=10&t=4131 --- source/net/filebot/media/VideoQuality.java | 2 +- source/net/filebot/util/StringUtilities.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/media/VideoQuality.java b/source/net/filebot/media/VideoQuality.java index 12c1061a..a4d98ab7 100644 --- a/source/net/filebot/media/VideoQuality.java +++ b/source/net/filebot/media/VideoQuality.java @@ -30,7 +30,7 @@ public class VideoQuality implements Comparator { try { return comparingDouble(c).compare(f1, f2); } catch (Throwable e) { - debug.warning(format("Failed to read media info: %s", e.getMessage())); + debug.warning(format("Failed to read media info: %s", e)); return 0; } }).filter(i -> i != 0).findFirst().orElse(0); diff --git a/source/net/filebot/util/StringUtilities.java b/source/net/filebot/util/StringUtilities.java index 58733a0d..2c2e63aa 100644 --- a/source/net/filebot/util/StringUtilities.java +++ b/source/net/filebot/util/StringUtilities.java @@ -63,6 +63,10 @@ public final class StringUtilities { } public static boolean find(String s, Pattern pattern) { + if (s == null || s.length() == 0) { + return false; + } + return pattern.matcher(s).find(); }