Fix NPE in KCallable.isAccessible for interfaces loaded by boot class loader
Class.getClassLoader returns null for classes loaded by the system class
loader (the one used to start the application). In this case we need to
use ClassLoader.getSystemClassLoader. We already have an extension
`safeClassLoader` specifically for this purpose in reflection.jvm, but
forgot to use it in d59f2bcc80.
#KT-37707 Fixed
This commit is contained in:
+5
@@ -25524,6 +25524,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("isAccessibleOnAllMembers.kt")
|
||||
public void testIsAccessibleOnAllMembers() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/functions/isAccessibleOnAllMembers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaClassGetFunctions.kt")
|
||||
public void testJavaClassGetFunctions() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt");
|
||||
|
||||
Reference in New Issue
Block a user