8300863: Remove C-style array declarations in java.io

Reviewed-by: alanb, rriggs, darcy, iris
This commit is contained in:
Per Minborg 2023-01-24 07:43:29 +00:00
parent 2292ce137c
commit 57f2d48e1e
8 changed files with 19 additions and 19 deletions

View file

@ -1216,7 +1216,7 @@ public class File
* @see java.nio.file.Files#newDirectoryStream(Path,String)
*/
public String[] list(FilenameFilter filter) {
String names[] = normalizedList();
String[] names = normalizedList();
if ((names == null) || (filter == null)) {
return names;
}
@ -1309,7 +1309,7 @@ public class File
* @see java.nio.file.Files#newDirectoryStream(Path,String)
*/
public File[] listFiles(FilenameFilter filter) {
String ss[] = normalizedList();
String[] ss = normalizedList();
if (ss == null) return null;
ArrayList<File> files = new ArrayList<>();
for (String s : ss)
@ -1347,7 +1347,7 @@ public class File
* @see java.nio.file.Files#newDirectoryStream(Path,java.nio.file.DirectoryStream.Filter)
*/
public File[] listFiles(FileFilter filter) {
String ss[] = normalizedList();
String[] ss = normalizedList();
if (ss == null) return null;
ArrayList<File> files = new ArrayList<>();
for (String s : ss) {