* ArrayList() has been optimized with JRE7u40

This commit is contained in:
Reinhard Pointner 2014-07-27 17:47:01 +00:00
parent 2b18ddef8a
commit 124e7471db
8 changed files with 10 additions and 10 deletions

View File

@ -29,7 +29,7 @@ public class XAttrUtil {
return null;
if (bufferLength == 0)
return new ArrayList<String>(0);
return new ArrayList<String>();
Memory valueBuffer = new Memory(bufferLength);
long valueLength = XAttr.INSTANCE.listxattr(path, valueBuffer, bufferLength, 0);

View File

@ -441,7 +441,7 @@ public class MediaDetection {
return matches;
}
private static final ArrayList<IndexEntry<SearchResult>> seriesIndex = new ArrayList<IndexEntry<SearchResult>>(0);
private static final ArrayList<IndexEntry<SearchResult>> seriesIndex = new ArrayList<IndexEntry<SearchResult>>();
public static List<IndexEntry<SearchResult>> getSeriesIndex() throws IOException {
synchronized (seriesIndex) {
@ -463,7 +463,7 @@ public class MediaDetection {
}
}
private static final ArrayList<IndexEntry<SearchResult>> animeIndex = new ArrayList<IndexEntry<SearchResult>>(0);
private static final ArrayList<IndexEntry<SearchResult>> animeIndex = new ArrayList<IndexEntry<SearchResult>>();
public static List<IndexEntry<SearchResult>> 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<IndexEntry<Movie>> movieIndex = new ArrayList<IndexEntry<Movie>>(0);
private static final ArrayList<IndexEntry<Movie>> movieIndex = new ArrayList<IndexEntry<Movie>>();
public static List<IndexEntry<Movie>> getMovieIndex() throws IOException {
synchronized (movieIndex) {

View File

@ -44,7 +44,7 @@ class AttributeTool extends Tool<TableModel> {
@Override
protected TableModel createModelInBackground(File root) throws InterruptedException {
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>(0);
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>();
FileAttributesTableModel model = new FileAttributesTableModel();
for (File file : files) {

View File

@ -72,7 +72,7 @@ class ExtractTool extends Tool<TableModel> {
@Override
protected TableModel createModelInBackground(File root) throws InterruptedException {
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>(0);
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>();
List<ArchiveEntry> entries = new ArrayList<ArchiveEntry>();
try {

View File

@ -70,7 +70,7 @@ class SplitTool extends Tool<TreeModel> {
int nextPart = 1;
long splitSize = getSplitSize();
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>(0);
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>();
List<TreeNode> rootGroup = new ArrayList<TreeNode>();
List<File> currentPart = new ArrayList<File>();

View File

@ -49,7 +49,7 @@ class TypeTool extends Tool<TreeModel> {
@Override
protected TreeModel createModelInBackground(File root) throws InterruptedException {
List<File> filesAndFolders = (root != null) ? listFiles(singleton(root), FILE_WALK_MAX_DEPTH, false, true, true) : new ArrayList<File>(0);
List<File> filesAndFolders = (root != null) ? listFiles(singleton(root), FILE_WALK_MAX_DEPTH, false, true, true) : new ArrayList<File>();
List<TreeNode> groups = new ArrayList<TreeNode>();
for (Entry<String, FileFilter> it : getMetaTypes().entrySet()) {

View File

@ -95,7 +95,7 @@ public class FileTransferable implements Transferable {
if (transferable instanceof List) {
return sortByUniquePath((List<File>) transferable); // FORCE NATURAL FILE ORDER
} else {
return new ArrayList<File>(0);
return new ArrayList<File>();
}
}

View File

@ -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<Episode>(0);
return new ArrayList<Episode>();
}
// select main title and anime start date