summaryrefslogtreecommitdiff
path: root/tools/codegen/src
diff options
context:
space:
mode:
author Aurimas Liutikas <aurimas@google.com> 2021-05-12 22:20:32 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-05-12 22:20:32 +0000
commitc2db9c85cc6b2a1c566ad1bbae0a17099b9dac5f (patch)
tree47a7775de64643f7b94f8a7e8a876352081331fc /tools/codegen/src
parenteb6daaa8af537cd997a5765d788113d2a2836d66 (diff)
parentf1e2bb9a8147a6614ea10577da187f93c282e305 (diff)
Merge "Revert "Fix incompatibilities with Kotlin 1.5.0"" am: f1e2bb9a81
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705633 Change-Id: Ic447f14fbeab4215efc758f301b626bc21766b31
Diffstat (limited to 'tools/codegen/src')
-rw-r--r--tools/codegen/src/com/android/codegen/Utils.kt4
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 a117aa09ab62..c19ae3b0b11f 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 }.maxOrNull()!!
- val col2w = map { (_, b) -> b.length }.maxOrNull()!!
+ val col1w = map { (a, _) -> a.length }.max()!!
+ val col2w = map { (_, b) -> b.length }.max()!!
return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n")
}