mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-149187 Build breaks with NullPointerException on IBM JDK
This commit is contained in:
@@ -49,6 +49,7 @@ public class SystemInfo extends SystemInfoRt {
|
||||
public static final boolean isAppleJvm = isAppleJvm();
|
||||
public static final boolean isOracleJvm = isOracleJvm();
|
||||
public static final boolean isSunJvm = isSunJvm();
|
||||
public static final boolean isIbmJvm = isIbmJvm();
|
||||
public static final boolean isJetbrainsJvm = isJetbrainsJvm();
|
||||
|
||||
public static boolean isOsVersionAtLeast(@NotNull String version) {
|
||||
@@ -218,6 +219,11 @@ public class SystemInfo extends SystemInfoRt {
|
||||
return vendor != null && StringUtil.containsIgnoreCase(vendor, "Sun") && StringUtil.containsIgnoreCase(vendor, "Microsystems");
|
||||
}
|
||||
|
||||
private static boolean isIbmJvm() {
|
||||
final String vendor = SystemProperties.getJavaVmVendor();
|
||||
return vendor != null && StringUtil.containsIgnoreCase(vendor, "IBM");
|
||||
}
|
||||
|
||||
private static boolean isAppleJvm() {
|
||||
final String vendor = SystemProperties.getJavaVmVendor();
|
||||
return vendor != null && StringUtil.containsIgnoreCase(vendor, "Apple");
|
||||
|
||||
@@ -56,7 +56,10 @@ public class UrlClassLoader extends ClassLoader {
|
||||
// todo[r.sh] drop condition in IDEA 15
|
||||
// todo[r.sh] drop reflection after migrating to Java 7+
|
||||
assert Patches.USE_REFLECTION_TO_ACCESS_JDK7;
|
||||
boolean parallelLoader = Boolean.parseBoolean(System.getProperty("idea.parallel.class.loader", "true"));
|
||||
|
||||
// IBM's classloader breaks when overridden getClassLoadingLock() is called, see https://youtrack.jetbrains.com/issue/IDEA-149187
|
||||
// so disallow parallel loading completely on JBM jdk
|
||||
boolean parallelLoader = !SystemInfo.isIbmJvm && Boolean.parseBoolean(System.getProperty("idea.parallel.class.loader", "true"));
|
||||
if (parallelLoader) {
|
||||
try {
|
||||
Method registerAsParallelCapable = ClassLoader.class.getDeclaredMethod("registerAsParallelCapable");
|
||||
|
||||
@@ -72,6 +72,8 @@ checkboxes
|
||||
checkstyle
|
||||
checksum
|
||||
chmod
|
||||
classloader
|
||||
classloading
|
||||
classpath
|
||||
clazz
|
||||
clion
|
||||
|
||||
Reference in New Issue
Block a user