mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
catch both IO and UncheckedIO exceptions
GitOrigin-RevId: 99977d604788c5a480791a9d29bd2ca13426dcde
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c8532f166d
commit
b07f68cb88
@@ -10,6 +10,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Set;
|
||||
@@ -90,7 +91,7 @@ public class JpsPathUtil {
|
||||
try (Stream<String> stream = Files.lines(projectDir.resolve(".name"))) {
|
||||
return stream.findFirst().map(String::trim).orElse(null);
|
||||
}
|
||||
catch (IOException e) {
|
||||
catch (IOException | UncheckedIOException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user