Files
Ilyas Selimov 5dad029787 RedundantFileCreation - fix tests
GitOrigin-RevId: db0bb376a5a4c6e57fc7cb6e4038e03cb7a4de93
2021-03-18 11:44:32 +00:00

20 lines
557 B
Java

// "Fix all 'Redundant 'File' instance creation' problems in file" "true"
import java.io.*;
import java.util.Formatter;
class Main {
private static String getSomePathname() {
return "Some pathname";
}
public void main(String[] args) throws IOException {
new FileInputStream(getSomePathname());
new FileOutputStream(getSomePathname());
new FileReader(getSomePathname());
new FileWriter(getSomePathname());
new PrintStream(getSomePathname());
new PrintWriter(getSomePathname());
new Formatter(getSomePathname());
}
}