mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-26 12:20:55 +07:00
15 lines
441 B
Java
15 lines
441 B
Java
// "Replace with 'Files.newInputStream()'" "true-preview"
|
|
import java.io.*;
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Paths;
|
|
|
|
class Foo {
|
|
void test(String path, boolean b, boolean b1) {
|
|
Path name = Paths.get(b ? b1 ? "foo" : path : "baz");
|
|
path = "bar";
|
|
try (InputStream is = Files.newInputStream(Paths.get(b ? b1 ? "foo" : path : "baz"))) {
|
|
} catch (IOException e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
} |