* workaround Java compiler issues

This commit is contained in:
Reinhard Pointner 2014-07-17 13:00:27 +00:00
parent 3678e7388d
commit 35859d7b75
5 changed files with 6 additions and 8 deletions

View File

@ -5,7 +5,6 @@ import static net.filebot.MediaTypes.*;
import java.awt.Color;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -45,7 +44,7 @@ class AttributeTool extends Tool<TableModel> {
@Override
protected TableModel createModelInBackground(File root) throws InterruptedException {
List<File> files = (root != null) ? FileUtilities.listFiles(root) : Collections.emptyList();
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>(0);
FileAttributesTableModel model = new FileAttributesTableModel();
for (File file : files) {

View File

@ -12,7 +12,6 @@ import java.beans.PropertyChangeEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
@ -73,7 +72,7 @@ class ExtractTool extends Tool<TableModel> {
@Override
protected TableModel createModelInBackground(File root) throws InterruptedException {
List<File> files = (root != null) ? FileUtilities.listFiles(root) : Collections.emptyList();
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>(0);
List<ArchiveEntry> entries = new ArrayList<ArchiveEntry>();
try {

View File

@ -9,6 +9,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
@ -250,7 +251,7 @@ public class FileTree extends JTree {
* Creates a root node (no parent, no title, empty list of children)
*/
public FolderNode() {
this(null, "", emptyList());
this(null, "", new ArrayList<TreeNode>(0));
}
public FolderNode(String title, List<TreeNode> children) {

View File

@ -3,7 +3,6 @@ package net.filebot.ui.analyze;
import java.awt.Color;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.swing.JLabel;
@ -71,7 +70,7 @@ class SplitTool extends Tool<TreeModel> {
int nextPart = 1;
long splitSize = getSplitSize();
List<File> files = (root != null) ? FileUtilities.listFiles(root) : Collections.emptyList();
List<File> files = (root != null) ? FileUtilities.listFiles(root) : new ArrayList<File>(0);
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) : emptyList();
List<File> filesAndFolders = (root != null) ? listFiles(singleton(root), FILE_WALK_MAX_DEPTH, false, true, true) : new ArrayList<File>(0);
List<TreeNode> groups = new ArrayList<TreeNode>();
for (Entry<String, FileFilter> it : getMetaTypes().entrySet()) {