mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #15428 from igfoo/igfoo/catch_illegal_arg
Kotlin: Catch/ignore a IllegalArgumentException exception
This commit is contained in:
@@ -990,21 +990,26 @@ open class KotlinFileExtractor(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
c.declarations.forEach {
|
||||
extractDeclaration(
|
||||
it,
|
||||
extractPrivateMembers = extractPrivateMembers,
|
||||
extractFunctionBodies = extractFunctionBodies,
|
||||
extractAnnotations = true
|
||||
try {
|
||||
c.declarations.forEach {
|
||||
extractDeclaration(
|
||||
it,
|
||||
extractPrivateMembers = extractPrivateMembers,
|
||||
extractFunctionBodies = extractFunctionBodies,
|
||||
extractAnnotations = true
|
||||
)
|
||||
}
|
||||
if (extractStaticInitializer) extractStaticInitializer(c, { id })
|
||||
extractJvmStaticProxyMethods(
|
||||
c,
|
||||
id,
|
||||
extractPrivateMembers,
|
||||
extractFunctionBodies
|
||||
)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
// A Kotlin bug causes this to throw: https://youtrack.jetbrains.com/issue/KT-63847/K2-IllegalStateException-IrFieldPublicSymbolImpl-for-java.time-Clock.OffsetClock.offset0-is-already-bound
|
||||
// TODO: This should either be removed or log something, once the bug is fixed
|
||||
}
|
||||
if (extractStaticInitializer) extractStaticInitializer(c, { id })
|
||||
extractJvmStaticProxyMethods(
|
||||
c,
|
||||
id,
|
||||
extractPrivateMembers,
|
||||
extractFunctionBodies
|
||||
)
|
||||
}
|
||||
}
|
||||
if (c.isNonCompanionObject) {
|
||||
|
||||
Reference in New Issue
Block a user