From 124e7471dbd60f48e4d81574476e46578711237b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 27 Jul 2014 17:47:01 +0000 Subject: [PATCH] * ArrayList() has been optimized with JRE7u40 --- source/net/filebot/mac/xattr/XAttrUtil.java | 2 +- source/net/filebot/media/MediaDetection.java | 6 +++--- source/net/filebot/ui/analyze/AttributeTool.java | 2 +- source/net/filebot/ui/analyze/ExtractTool.java | 2 +- source/net/filebot/ui/analyze/SplitTool.java | 2 +- source/net/filebot/ui/analyze/TypeTool.java | 2 +- source/net/filebot/ui/transfer/FileTransferable.java | 2 +- source/net/filebot/web/AnidbClient.java | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/net/filebot/mac/xattr/XAttrUtil.java b/source/net/filebot/mac/xattr/XAttrUtil.java index e13ed37c..8278a10f 100644 --- a/source/net/filebot/mac/xattr/XAttrUtil.java +++ b/source/net/filebot/mac/xattr/XAttrUtil.java @@ -29,7 +29,7 @@ public class XAttrUtil { return null; if (bufferLength == 0) - return new ArrayList(0); + return new ArrayList(); Memory valueBuffer = new Memory(bufferLength); long valueLength = XAttr.INSTANCE.listxattr(path, valueBuffer, bufferLength, 0); diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index ed2d384c..b828d5a6 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -441,7 +441,7 @@ public class MediaDetection { return matches; } - private static final ArrayList> seriesIndex = new ArrayList>(0); + private static final ArrayList> seriesIndex = new ArrayList>(); public static List> getSeriesIndex() throws IOException { synchronized (seriesIndex) { @@ -463,7 +463,7 @@ public class MediaDetection { } } - private static final ArrayList> animeIndex = new ArrayList>(0); + private static final ArrayList> animeIndex = new ArrayList>(); public static List> getAnimeIndex() throws IOException { synchronized (animeIndex) { @@ -812,7 +812,7 @@ public class MediaDetection { return matches != null && matches.size() > 0 ? matches.get(0) : null; } - private static final ArrayList> movieIndex = new ArrayList>(0); + private static final ArrayList> movieIndex = new ArrayList>(); public static List> getMovieIndex() throws IOException { synchronized (movieIndex) { diff --git a/source/net/filebot/ui/analyze/AttributeTool.java b/source/net/filebot/ui/analyze/AttributeTool.java index 1edc3968..d110fc22 100644 --- a/source/net/filebot/ui/analyze/AttributeTool.java +++ b/source/net/filebot/ui/analyze/AttributeTool.java @@ -44,7 +44,7 @@ class AttributeTool extends Tool { @Override protected TableModel createModelInBackground(File root) throws InterruptedException { - List files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList(0); + List files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList(); FileAttributesTableModel model = new FileAttributesTableModel(); for (File file : files) { diff --git a/source/net/filebot/ui/analyze/ExtractTool.java b/source/net/filebot/ui/analyze/ExtractTool.java index 742fa3c8..5576aaa5 100644 --- a/source/net/filebot/ui/analyze/ExtractTool.java +++ b/source/net/filebot/ui/analyze/ExtractTool.java @@ -72,7 +72,7 @@ class ExtractTool extends Tool { @Override protected TableModel createModelInBackground(File root) throws InterruptedException { - List files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList(0); + List files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList(); List entries = new ArrayList(); try { diff --git a/source/net/filebot/ui/analyze/SplitTool.java b/source/net/filebot/ui/analyze/SplitTool.java index 66cbb604..04b2ea64 100644 --- a/source/net/filebot/ui/analyze/SplitTool.java +++ b/source/net/filebot/ui/analyze/SplitTool.java @@ -70,7 +70,7 @@ class SplitTool extends Tool { int nextPart = 1; long splitSize = getSplitSize(); - List files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList(0); + List files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList(); List rootGroup = new ArrayList(); List currentPart = new ArrayList(); diff --git a/source/net/filebot/ui/analyze/TypeTool.java b/source/net/filebot/ui/analyze/TypeTool.java index fc5a4ec1..081a17fd 100644 --- a/source/net/filebot/ui/analyze/TypeTool.java +++ b/source/net/filebot/ui/analyze/TypeTool.java @@ -49,7 +49,7 @@ class TypeTool extends Tool { @Override protected TreeModel createModelInBackground(File root) throws InterruptedException { - List filesAndFolders = (root != null) ? listFiles(singleton(root), FILE_WALK_MAX_DEPTH, false, true, true) : new ArrayList(0); + List filesAndFolders = (root != null) ? listFiles(singleton(root), FILE_WALK_MAX_DEPTH, false, true, true) : new ArrayList(); List groups = new ArrayList(); for (Entry it : getMetaTypes().entrySet()) { diff --git a/source/net/filebot/ui/transfer/FileTransferable.java b/source/net/filebot/ui/transfer/FileTransferable.java index 1c39afa1..516cd688 100644 --- a/source/net/filebot/ui/transfer/FileTransferable.java +++ b/source/net/filebot/ui/transfer/FileTransferable.java @@ -95,7 +95,7 @@ public class FileTransferable implements Transferable { if (transferable instanceof List) { return sortByUniquePath((List) transferable); // FORCE NATURAL FILE ORDER } else { - return new ArrayList(0); + return new ArrayList(); } } diff --git a/source/net/filebot/web/AnidbClient.java b/source/net/filebot/web/AnidbClient.java index c97f5601..763593fd 100644 --- a/source/net/filebot/web/AnidbClient.java +++ b/source/net/filebot/web/AnidbClient.java @@ -107,7 +107,7 @@ public class AnidbClient extends AbstractEpisodeListProvider { // AniDB types: Movie, Music Video, Other, OVA, TV Series, TV Special, Web, unknown String animeType = selectString("//type", dom); if (animeType != null && animeType.matches("(?i:music.video|unkown|other)")) { - return new ArrayList(0); + return new ArrayList(); } // select main title and anime start date