GitOrigin-RevId: 7d80460b3a93df0d05601336bb96650d4bdef15a
This commit is contained in:
Konstantin Bulenkov
2020-07-18 23:45:19 +00:00
committed by intellij-monorepo-bot
parent b5e0fc29cb
commit 28725f6639
@@ -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);