mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Cleanup - Collection.toArray
This commit is contained in:
@@ -122,7 +122,7 @@ public class DialogChooseFormats {
|
||||
|
||||
choices.addAll(formats);
|
||||
final FCheckBoxList<FCheckBox> cbl = new FCheckBoxList<>(false);
|
||||
cbl.setListData(formats.toArray(new FCheckBox[formats.size()]));
|
||||
cbl.setListData(formats.toArray(new FCheckBox[0]));
|
||||
cbl.setVisibleRowCount(Math.min(20, formats.size()));
|
||||
|
||||
if (focused) {
|
||||
|
||||
@@ -209,7 +209,7 @@ public class FCheckBoxTree extends JTree {
|
||||
}
|
||||
|
||||
public TreePath[] getCheckedPaths() {
|
||||
return checkedPaths.toArray(new TreePath[checkedPaths.size()]);
|
||||
return checkedPaths.toArray(new TreePath[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,7 +227,7 @@ public class FCheckBoxTree extends JTree {
|
||||
checkedValues.add(data.item);
|
||||
}
|
||||
}
|
||||
return checkedValues.toArray(new Object[checkedValues.size()]);
|
||||
return checkedValues.toArray(new Object[0]);
|
||||
}
|
||||
|
||||
// Returns true in case that the node is selected, has children but not all of them are selected
|
||||
|
||||
Reference in New Issue
Block a user