Skip to content

Commit 0dd7886

Browse files
committed
PR feedback checkpoint?
1 parent b68a9f5 commit 0dd7886

File tree

6 files changed

+4
-22
lines changed

6 files changed

+4
-22
lines changed

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/core/RuntimeTypes.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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")

runtime/protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsRequestInterceptor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

runtime/protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsResponseInterceptor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import aws.smithy.kotlin.runtime.InternalApi
1010
import aws.smithy.kotlin.runtime.client.ProtocolResponseInterceptorContext
1111
import aws.smithy.kotlin.runtime.client.config.HttpChecksumConfigOption
1212
import aws.smithy.kotlin.runtime.collections.AttributeKey
13-
import aws.smithy.kotlin.runtime.hashing.toHashFunction
13+
import aws.smithy.kotlin.runtime.hashing.toHashFunctionOrThrow
1414
import aws.smithy.kotlin.runtime.http.HttpBody
1515
import aws.smithy.kotlin.runtime.http.readAll
1616
import 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
}

runtime/runtime-core/api/runtime-core.api

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ public final class aws/smithy/kotlin/runtime/ErrorMetadata$Companion {
2121
public 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-
2824
public 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 {
20882084
public 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

20942089
public final class aws/smithy/kotlin/runtime/text/Utf8Kt {

runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Exceptions.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ package aws.smithy.kotlin.runtime
77
import aws.smithy.kotlin.runtime.collections.AttributeKey
88
import aws.smithy.kotlin.runtime.collections.MutableAttributes
99
import 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)

runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/text/Text.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@
66
package aws.smithy.kotlin.runtime.text
77

88
import aws.smithy.kotlin.runtime.InternalApi
9-
import java.util.*
109

1110
@InternalApi
1211
public fun String.ensurePrefix(prefix: String): String = if (startsWith(prefix)) this else prefix + this
1312

1413
@InternalApi
1514
public 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())

0 commit comments

Comments
 (0)