From b715c4d7301d45b8e2ff0308ee6eefc6ffdee2f0 Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Mon, 17 May 2021 17:41:41 +0000 Subject: Revert^2 "Fix incompatibilities with Kotlin 1.5.0" c5b4071877530ba3eb6ce5f55fc8c101ea1f35e4 Change-Id: I1fc09f028411cce8bdaa9eec68eaf88116f2143f --- 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