mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-12 22:57:58 +07:00
GitOrigin-RevId: 1910c9203725e2c49fb56fc0c92121f5f56c99ce
26 lines
608 B
Java
26 lines
608 B
Java
import java.io.*;
|
|
|
|
class Test {
|
|
String m() {
|
|
try (final BufferedReader br = new BufferedReader(new FileReader("foo"))) {
|
|
return br.readLine();
|
|
} catch (final Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
void n() {
|
|
new Runnable() {
|
|
@Override
|
|
public void run() {
|
|
try (InputStream <warning descr="Variable 'is' can have 'final' modifier">is</warning> = new FileInputStream(new File("b"))) {
|
|
System.out.println(is);
|
|
}
|
|
catch (final IOException e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
} |