-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 6
-
Component/s: core-libs
-
b78
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
File.list(FilenameFilter)
File.listFiles(FilenameFilter)
File.listFiles(FileFilter)
all create the resultant list of files using the reflective form of toArray. As these methods are intensive already, seems like this is a silly thing to do.
Code should be changed to
return (File[])(v.toArray(new File[v.size()]));
JUSTIFICATION :
performance
File.list(FilenameFilter)
File.listFiles(FilenameFilter)
File.listFiles(FileFilter)
all create the resultant list of files using the reflective form of toArray. As these methods are intensive already, seems like this is a silly thing to do.
Code should be changed to
return (File[])(v.toArray(new File[v.size()]));
JUSTIFICATION :
performance