mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Only log once the missing java-kotlin method mapping warnings
This commit is contained in:
@@ -201,6 +201,8 @@ class KotlinExtractorGlobalState {
|
||||
val syntheticToRealClassMap = HashMap<IrClass, IrClass?>()
|
||||
val syntheticToRealFunctionMap = HashMap<IrFunction, IrFunction?>()
|
||||
val syntheticToRealFieldMap = HashMap<IrField, IrField?>()
|
||||
|
||||
val deduplicatedWarnings = mutableSetOf<String>()
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1290,7 +1290,11 @@ open class KotlinUsesExtractor(
|
||||
else null
|
||||
} ?: run {
|
||||
val parentFqName = parentClass.fqNameWhenAvailable?.asString()
|
||||
logger.warn("Couldn't find a Java equivalent function to $parentFqName.${f.name} in ${javaClass.fqNameWhenAvailable}")
|
||||
val msg = "Couldn't find a Java equivalent function to $parentFqName.${f.name} in ${javaClass.fqNameWhenAvailable}"
|
||||
if (!globalExtensionState.deduplicatedWarnings.contains(msg)) {
|
||||
logger.warn(msg)
|
||||
globalExtensionState.deduplicatedWarnings.add(msg)
|
||||
}
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user