diff --git a/platform/platform-impl/src/com/intellij/ide/SystemHealthMonitor.java b/platform/platform-impl/src/com/intellij/ide/SystemHealthMonitor.java index 2bc82243f1c2..5752c0b83a6e 100644 --- a/platform/platform-impl/src/com/intellij/ide/SystemHealthMonitor.java +++ b/platform/platform-impl/src/com/intellij/ide/SystemHealthMonitor.java @@ -98,7 +98,7 @@ public class SystemHealthMonitor extends ApplicationComponent.Adapter { } else if (SystemInfo.isWindows || SystemInfo.isLinux) { JdkBundle bundledJdk = JdkBundle.createBundle(bundledJDKAbsoluteLocation, false, false); - if (bundledJdk.getVersion() != null) { + if (bundledJdk != null && bundledJdk.getVersion() != null) { showSwitchOption = true; // Version of bundled jdk is available, so the jdk is compatible with underlying OS } } diff --git a/platform/platform-impl/src/com/intellij/util/JdkBundle.java b/platform/platform-impl/src/com/intellij/util/JdkBundle.java index 0a3e7206482a..b0a8e27611b2 100644 --- a/platform/platform-impl/src/com/intellij/util/JdkBundle.java +++ b/platform/platform-impl/src/com/intellij/util/JdkBundle.java @@ -63,10 +63,12 @@ public class JdkBundle { myBundled = bundled; } + @Nullable public static JdkBundle createBundle(@NotNull File jvm, boolean boot, boolean bundled) { return createBundle(jvm, boot, bundled, true); } + @Nullable public static JdkBundle createBundle(@NotNull File jvm, boolean boot, boolean bundled, boolean matchArch) { String homeSubPath = SystemInfo.isMac ? "Contents/Home" : ""; return createBundle(jvm, homeSubPath, boot, bundled, matchArch);