mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RedundantFileCreationInspection created: IDEA-249165
GitOrigin-RevId: 2d8ea0c12c2320d5f8b0e685b9a047bf3f972852
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0dad544331
commit
a65ac28d32
+15
@@ -0,0 +1,15 @@
|
||||
// "Fix all 'Redundant file creation' problems in file" "true"
|
||||
import java.io.*;
|
||||
import java.util.Formatter;
|
||||
|
||||
class Main {
|
||||
public main(String[] args) {
|
||||
InputStream is = new FileInputStream("1.txt");
|
||||
OutputStream os = new FileOutputStream("2.txt");
|
||||
FileReader fr = new FileReader("3.txt");
|
||||
FileWriter fw = new FileWriter("4.txt");
|
||||
PrintStream ps = new PrintStream("5.txt");
|
||||
PrintWriter pw = new PrintWriter("6.txt");
|
||||
Formatter f = new Formatter("7.txt");
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Fix all 'Redundant file creation' problems in file" "true"
|
||||
import java.io.*;
|
||||
import java.util.Formatter;
|
||||
|
||||
class Main {
|
||||
private static String getSomePathname() {
|
||||
return "Some pathname";
|
||||
}
|
||||
|
||||
public main(String[] args) {
|
||||
InputStream is = new FileInputStream(getSomePathname());
|
||||
OutputStream os = new FileOutputStream(getSomePathname());
|
||||
FileReader fr = new FileReader(getSomePathname());
|
||||
FileWriter fw = new FileWriter(getSomePathname());
|
||||
PrintStream ps = new PrintStream(getSomePathname());
|
||||
PrintWriter pw = new PrintWriter(getSomePathname());
|
||||
Formatter f = new Formatter(getSomePathname());
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Fix all 'Redundant file creation' problems in file" "true"
|
||||
import java.io.*;
|
||||
import java.util.Formatter;
|
||||
|
||||
class Main {
|
||||
public main(String[] args) {
|
||||
InputStream is = new FileInputStream(new Fi<caret>le("1.txt"));
|
||||
OutputStream os = new FileOutputStream(new File("2.txt"));
|
||||
FileReader fr = new FileReader(new File("3.txt"));
|
||||
FileWriter fw = new FileWriter(new File("4.txt"));
|
||||
PrintStream ps = new PrintStream(new File("5.txt"));
|
||||
PrintWriter pw = new PrintWriter(new File("6.txt"));
|
||||
Formatter f = new Formatter(new File("7.txt"));
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Fix all 'Redundant file creation' problems in file" "true"
|
||||
import java.io.*;
|
||||
import java.util.Formatter;
|
||||
|
||||
class Main {
|
||||
private static String getSomePathname() {
|
||||
return "Some pathname";
|
||||
}
|
||||
|
||||
public main(String[] args) {
|
||||
InputStream is = new FileInputStream(new Fi<caret>le(getSomePathname()));
|
||||
OutputStream os = new FileOutputStream(new File(getSomePathname()));
|
||||
FileReader fr = new FileReader(new File(getSomePathname()));
|
||||
FileWriter fw = new FileWriter(new File(getSomePathname()));
|
||||
PrintStream ps = new PrintStream(new File(getSomePathname()));
|
||||
PrintWriter pw = new PrintWriter(new File(getSomePathname()));
|
||||
Formatter f = new Formatter(new File(getSomePathname()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user