Replace deprecated usages of max/min with maxOrNull/minOrNull

This commit is contained in:
Alexander Udalov
2020-08-13 18:14:02 +02:00
parent 81dda96ece
commit a9ddf02556
48 changed files with 86 additions and 84 deletions
@@ -145,7 +145,7 @@ private fun readClassFileImpl(
}
private fun findClassFileByPaths(packageName: String, className: String, paths: List<String>): File? =
paths.mapNotNull { path -> findClassFileByPath(packageName, className, path) }.maxBy { it.lastModified() }
paths.mapNotNull { path -> findClassFileByPath(packageName, className, path) }.maxByOrNull { it.lastModified() }
private fun findClassFileByPath(packageName: String, className: String, outputDirPath: String): File? {
val outDirFile = File(outputDirPath).takeIf(File::exists) ?: return null