File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
java/kotlin-extractor/src/main/kotlin Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1474,9 +1474,21 @@ open class KotlinFileExtractor(
1474
1474
logger.warn(" Cannot find functional interface type for raw method access" )
1475
1475
null
1476
1476
} else {
1477
- val interfaceType = functionalInterface.classOrNull!! .owner
1478
- val substituted = getJavaEquivalentClass(interfaceType) ? : interfaceType
1479
- findFunction(substituted, OperatorNameConventions .INVOKE .asString())!!
1477
+ val functionalInterfaceClass = functionalInterface.classOrNull
1478
+ if (functionalInterfaceClass == null ) {
1479
+ logger.warn(" Cannot find functional interface class for raw method access" )
1480
+ null
1481
+ } else {
1482
+ val interfaceType = functionalInterfaceClass.owner
1483
+ val substituted = getJavaEquivalentClass(interfaceType) ? : interfaceType
1484
+ val function = findFunction(substituted, OperatorNameConventions .INVOKE .asString())
1485
+ if (function == null ) {
1486
+ logger.warn(" Cannot find invoke function for raw method access" )
1487
+ null
1488
+ } else {
1489
+ function
1490
+ }
1491
+ }
1480
1492
}
1481
1493
} else {
1482
1494
callTarget
You can’t perform that action at this time.
0 commit comments