mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 17:51:09 +07:00
14 lines
290 B
Java
14 lines
290 B
Java
// "Replace with 'Files.newInputStream()'" "true-preview"
|
|
import java.io.*;
|
|
import java.nio.file.Files;
|
|
|
|
class Foo {
|
|
void test(boolean b, File f) throws IOException {
|
|
Path p;
|
|
if (b) {
|
|
p = f.toPath();
|
|
try (InputStream is = Files.newInputStream(p)) {
|
|
}
|
|
}
|
|
}
|
|
} |