File tree Expand file tree Collapse file tree 3 files changed +10
-18
lines changed
codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen
common/src/aws/smithy/kotlin/runtime/util
jvm/src/aws/smithy/kotlin/runtime/util Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 55
66package software.amazon.smithy.kotlin.codegen
77
8- import org.junit.jupiter.api.assertThrows
98import software.amazon.smithy.codegen.core.CodegenException
109import software.amazon.smithy.kotlin.codegen.test.TestModelDefault
1110import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
@@ -284,7 +283,7 @@ class KotlinSettingsTest {
284283 }
285284 """ .trimIndent()
286285
287- assertThrows <IllegalArgumentException > {
286+ assertFailsWith <IllegalArgumentException > {
288287 KotlinSettings .from(
289288 model,
290289 Node .parse(contents).expectObjectNode(),
Original file line number Diff line number Diff line change 66package aws.smithy.kotlin.runtime.util
77
88import aws.smithy.kotlin.runtime.InternalApi
9+ import kotlin.jvm.JvmName
910
1011@InternalApi
1112public fun Short.toNumber (): Short = this
@@ -64,3 +65,11 @@ public fun Any?.type(): String = when (this) {
6465 null -> " null"
6566 else -> throw Exception (" Undetected type for: $this " )
6667}
68+
69+ @InternalApi
70+ @JvmName(" noOpUnnestedCollection" )
71+ public inline fun <reified T > Collection<T>.flattenIfPossible (): Collection <T > = this
72+
73+ @InternalApi
74+ @JvmName(" flattenNestedCollection" )
75+ public inline fun <reified T > Collection<Collection<T>>.flattenIfPossible (): Collection <T > = flatten()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments