mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
surround with closeable: don't include unrelated variables (IDEA-159434)
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
class C {
|
||||
void m(File file) throws IOException {
|
||||
String s;
|
||||
try (FileInputStream fileInputStream = new FileInputStream(file)) {
|
||||
//Non-NLS
|
||||
s = "initial value";
|
||||
s = s + fileInputStream.read();
|
||||
}
|
||||
s += "end";
|
||||
int time = 0;
|
||||
System.out.println(time);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user