File tree Expand file tree Collapse file tree 6 files changed +4
-22
lines changed
codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/core
protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/interceptors
common/src/aws/smithy/kotlin/runtime Expand file tree Collapse file tree 6 files changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,6 @@ object RuntimeTypes {
106106 val TimestampFormat = symbol(" TimestampFormat" , " time" )
107107 val ClientException = symbol(" ClientException" )
108108 val SdkDsl = symbol(" SdkDsl" )
109- val IllegalStateException = symbol(" IllegalStateException" )
110109
111110 object BusinessMetrics : RuntimeTypePackage(KotlinDependency .CORE , " businessmetrics" ) {
112111 val AccountIdBasedEndpointAccountId = symbol(" AccountIdBasedEndpointAccountId" )
@@ -183,7 +182,6 @@ object RuntimeTypes {
183182 }
184183
185184 object Text : RuntimeTypePackage(KotlinDependency .CORE , " text" ) {
186- val lowercase = symbol(" lowercase" )
187185 object Encoding : RuntimeTypePackage(KotlinDependency .CORE , " text.encoding" ) {
188186 val decodeBase64 = symbol(" decodeBase64" )
189187 val decodeBase64Bytes = symbol(" decodeBase64Bytes" )
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public class FlexibleChecksumsRequestInterceptor<I>(
100100 }
101101
102102 if (checksumAlgorithm == null ) {
103- logger.debug { " A checksum algorithm isn't selected and checksum calculation isn't required, skipping checksum calculation" }
103+ logger.debug { " A checksum algorithm isn't selected or checksum calculation isn't required, skipping checksum calculation" }
104104 return context.protocolRequest
105105 }
106106
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import aws.smithy.kotlin.runtime.InternalApi
1010import aws.smithy.kotlin.runtime.client.ProtocolResponseInterceptorContext
1111import aws.smithy.kotlin.runtime.client.config.HttpChecksumConfigOption
1212import aws.smithy.kotlin.runtime.collections.AttributeKey
13- import aws.smithy.kotlin.runtime.hashing.toHashFunction
13+ import aws.smithy.kotlin.runtime.hashing.toHashFunctionOrThrow
1414import aws.smithy.kotlin.runtime.http.HttpBody
1515import aws.smithy.kotlin.runtime.http.readAll
1616import aws.smithy.kotlin.runtime.http.request.HttpRequest
@@ -81,7 +81,7 @@ public class FlexibleChecksumsResponseInterceptor<I>(
8181
8282 val checksumAlgorithm = checksumHeader
8383 .removePrefix(" x-amz-checksum-" )
84- .toHashFunction() ? : throw ClientException ( " Could not parse checksum algorithm from header $checksumHeader " )
84+ .toHashFunctionOrThrow( )
8585
8686 when (val bodyType = context.protocolResponse.body) {
8787 is HttpBody .Bytes -> {
@@ -108,7 +108,7 @@ public class FlexibleChecksumsResponseInterceptor<I>(
108108 .toChecksumValidatingBody(serviceChecksumValue),
109109 )
110110 }
111- else -> throw IllegalStateException (" Http body type '$bodyType ' is not supported for flexible checksums." )
111+ else -> throw IllegalStateException (" HTTP body type '$bodyType ' is not supported for flexible checksums." )
112112 }
113113 }
114114}
Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ public final class aws/smithy/kotlin/runtime/ErrorMetadata$Companion {
2121public abstract interface annotation class aws/smithy/kotlin/runtime/ExperimentalApi : java/lang/annotation/Annotation {
2222}
2323
24- public final class aws/smithy/kotlin/runtime/IllegalStateException : java/lang/IllegalStateException {
25- public fun <init> (Ljava/lang/String;)V
26- }
27-
2824public abstract interface annotation class aws/smithy/kotlin/runtime/InternalApi : java/lang/annotation/Annotation {
2925}
3026
@@ -2088,7 +2084,6 @@ public final class aws/smithy/kotlin/runtime/text/Scanner {
20882084public final class aws/smithy/kotlin/runtime/text/TextKt {
20892085 public static final fun ensurePrefix (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
20902086 public static final fun ensureSuffix (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2091- public static final fun lowercase (Ljava/lang/String;)Ljava/lang/String;
20922087}
20932088
20942089public final class aws/smithy/kotlin/runtime/text/Utf8Kt {
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ package aws.smithy.kotlin.runtime
77import aws.smithy.kotlin.runtime.collections.AttributeKey
88import aws.smithy.kotlin.runtime.collections.MutableAttributes
99import aws.smithy.kotlin.runtime.collections.mutableAttributes
10- import kotlin.IllegalStateException
1110
1211/* *
1312 * Additional metadata about an error
@@ -175,9 +174,3 @@ public open class ServiceException : SdkBaseException {
175174
176175 override val sdkErrorMetadata: ServiceErrorMetadata = ServiceErrorMetadata ()
177176}
178-
179- /* *
180- * Runtime accessible version of the [IllegalStateException]
181- */
182- @InternalApi
183- public class IllegalStateException (message : String ) : IllegalStateException(message)
Original file line number Diff line number Diff line change 66package aws.smithy.kotlin.runtime.text
77
88import aws.smithy.kotlin.runtime.InternalApi
9- import java.util.*
109
1110@InternalApi
1211public fun String.ensurePrefix (prefix : String ): String = if (startsWith(prefix)) this else prefix + this
1312
1413@InternalApi
1514public fun String.ensureSuffix (suffix : String ): String = if (endsWith(suffix)) this else plus(suffix)
16-
17- @InternalApi
18- public fun String.lowercase (): String = this .lowercase(Locale .getDefault())
You can’t perform that action at this time.
0 commit comments