Fix warnings in daemon-related modules

This commit is contained in:
Alexander Udalov
2021-07-30 16:17:03 +02:00
parent ca7334acb9
commit 11902c7f8f
4 changed files with 9 additions and 5 deletions
@@ -359,6 +359,7 @@ object KotlinCompilerClient {
.thenBy(FileAgeComparator()) { it.runFile }
val optsCopy = daemonJVMOptions.copy()
// if required options fit into fattest running daemon - return the daemon and required options with memory params set to actual ones in the daemon
@Suppress("DEPRECATION") // TODO: replace with maxWithOrNull as soon as minimal version of Gradle that we support has Kotlin 1.4+.
return aliveWithMetadata.maxWith(comparator)?.takeIf { daemonJVMOptions memorywiseFitsInto it.jvmOptions }?.let {
Pair(it.daemon, optsCopy.updateMemoryUpperBounds(it.jvmOptions))
}