* ArrayList() has been optimized with JRE7u40
This commit is contained in:
parent
2b18ddef8a
commit
124e7471db
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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>();
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue