KT-7521 Compilation problem of dependent modules with different jdks
#KT-7521 fixed
This commit is contained in:
@@ -132,13 +132,13 @@ public class ClassBuilderFactories {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getCommonSuperClass(@NotNull String type1, @NotNull String type2) {
|
protected String getCommonSuperClass(@NotNull String type1, @NotNull String type2) {
|
||||||
try {
|
// This method is needed to generate StackFrameMap: bytecode metadata for JVM verification. For bytecode version 50.0 (JDK 6)
|
||||||
return super.getCommonSuperClass(type1, type2);
|
// these maps can be invalid: in this case, JVM would generate them itself (potentially slowing class loading),
|
||||||
}
|
// for bytecode 51.0+ (JDK 7+) JVM would crash with VerifyError.
|
||||||
catch (Throwable t) {
|
// It seems that for bytecode emitted by Kotlin compiler, it is safe to return "Object" here, because there will
|
||||||
// @todo we might need at some point do more sophisticated handling
|
// be "checkcast" generated before making a call, anyway.
|
||||||
return "java/lang/Object";
|
|
||||||
}
|
return "java/lang/Object";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user