mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-166892 NullPointerException on startup
Added checks and nullables to handle customized IDEA installations
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user