mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NPE
GitOrigin-RevId: 7d80460b3a93df0d05601336bb96650d4bdef15a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b5e0fc29cb
commit
28725f6639
+4
-2
@@ -51,12 +51,14 @@ final class JavaHomeFinderMac extends JavaHomeFinderBasic {
|
||||
List<Path> result = new ArrayList<>();
|
||||
result.add(file);
|
||||
|
||||
if (file.getFileName().toString().equalsIgnoreCase("Home")) {
|
||||
Path home = file.getFileName();
|
||||
if (home != null && home.toString().equalsIgnoreCase("Home")) {
|
||||
Path parentFile = file.getParent();
|
||||
if (parentFile != null) {
|
||||
result.add(parentFile);
|
||||
|
||||
if (parentFile.getFileName().toString().equalsIgnoreCase("Contents")) {
|
||||
Path contents = parentFile.getFileName();
|
||||
if (contents != null && contents.toString().equalsIgnoreCase("Contents")) {
|
||||
Path parentParentFile = parentFile.getParent();
|
||||
if (parentParentFile != null) {
|
||||
result.add(parentParentFile);
|
||||
|
||||
Reference in New Issue
Block a user