mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Kotlin: Don't give stack traces for fake labels
There might be a significant performance hit for it.
This commit is contained in:
@@ -263,9 +263,13 @@ fun doFile(invocationTrapFile: String, checkTrapIdentical: Boolean, logger: Logg
|
||||
}
|
||||
|
||||
fun <T> fakeLabel(): Label<T> {
|
||||
val sw = StringWriter()
|
||||
Exception().printStackTrace(PrintWriter(sw))
|
||||
println("Fake label from:\n$sw")
|
||||
if (true) {
|
||||
println("Fake label")
|
||||
} else {
|
||||
val sw = StringWriter()
|
||||
Exception().printStackTrace(PrintWriter(sw))
|
||||
println("Fake label from:\n$sw")
|
||||
}
|
||||
return Label(0)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user