From b8ca1157ab6d463a19f6a7bbfeb25d1f9f1be911 Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Wed, 5 May 2021 12:43:01 -0700 Subject: Fix incompatibilities with Kotlin 1.5.0 Test: make Change-Id: I9bc49c759d0b2527b6419f5d711e394402a7e781 --- tools/codegen/src/com/android/codegen/Utils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/codegen/src') diff --git a/tools/codegen/src/com/android/codegen/Utils.kt b/tools/codegen/src/com/android/codegen/Utils.kt index c19ae3b0b11f..a117aa09ab62 100644 --- a/tools/codegen/src/com/android/codegen/Utils.kt +++ b/tools/codegen/src/com/android/codegen/Utils.kt @@ -43,8 +43,8 @@ inline infix fun Int.times(action: () -> Unit) { * cccc dd */ fun Iterable>.columnize(separator: String = " | "): String { - val col1w = map { (a, _) -> a.length }.max()!! - val col2w = map { (_, b) -> b.length }.max()!! + val col1w = map { (a, _) -> a.length }.maxOrNull()!! + val col2w = map { (_, b) -> b.length }.maxOrNull()!! return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n") } -- cgit v1.2.3-59-g8ed1b