mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 02:24:00 +07:00
GitOrigin-RevId: db0bb376a5a4c6e57fc7cb6e4038e03cb7a4de93
20 lines
634 B
Java
20 lines
634 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(new Fi<caret>le(getSomePathname()));
|
|
new FileOutputStream(new File(getSomePathname()));
|
|
new FileReader(new File(getSomePathname()));
|
|
new FileWriter(new File(getSomePathname()));
|
|
new PrintStream(new File(getSomePathname()));
|
|
new PrintWriter(new File(getSomePathname()));
|
|
new Formatter(new File(getSomePathname()));
|
|
}
|
|
}
|