diff options
author | Aurimas Liutikas <aurimas@google.com> | 2021-05-11 21:20:45 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-11 21:20:45 +0000 |
commit | 4c9b195caed851e01322a9509aaa476f15e760dd (patch) | |
tree | f1ff8e9e1bd3d6201cb8b86abda9aca39bbd0a16 /tools | |
parent | 59ea888741694708a39d88187f33eccc1eb1e632 (diff) | |
parent | c61fdfd2d11e4261b333db4f5ac9845c5e5ed055 (diff) |
Merge "Fix incompatibilities with Kotlin 1.5.0" am: 600dcaf908 am: 70ba49b0e5 am: c61fdfd2d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1697314
Change-Id: I4c76908e0cf9a1ba0493322c1f8dedb4fa925e80
Diffstat (limited to 'tools')
-rw-r--r-- | tools/codegen/src/com/android/codegen/Utils.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/codegen/src/com/android/codegen/Utils.kt b/tools/codegen/src/com/android/codegen/Utils.kt index 7cfa7847fcff..9ceb2042d74e 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<Pair<String, String>>.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") } |