mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Kotlin: Remove a throw statement
We have a way to carry on here, so we may as well do so
This commit is contained in:
@@ -354,7 +354,12 @@ private fun getTrapFileWriter(compression: Compression, logger: FileLogger, trap
|
|||||||
return when (compression) {
|
return when (compression) {
|
||||||
Compression.NONE -> NonCompressedTrapFileWriter(logger, trapFileName)
|
Compression.NONE -> NonCompressedTrapFileWriter(logger, trapFileName)
|
||||||
Compression.GZIP -> GZipCompressedTrapFileWriter(logger, trapFileName)
|
Compression.GZIP -> GZipCompressedTrapFileWriter(logger, trapFileName)
|
||||||
Compression.BROTLI -> throw Exception("Brotli compression is not supported by the Kotlin extractor")
|
Compression.BROTLI -> {
|
||||||
|
// Brotli should have been replaced with gzip earlier, but
|
||||||
|
// if we somehow manage to get here then keep going
|
||||||
|
logger.error("Impossible Brotli compression requested. Using Gzip instead.")
|
||||||
|
getTrapFileWriter(Compression.GZIP, logger, trapFileName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user