Skip to content

Commit 6ca94cc

Browse files
committed
Remove lazy
1 parent 75db9e6 commit 6ca94cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

runtime/runtime-core/native/src/aws/smithy/kotlin/runtime/time/InstantNative.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public actual class Instant(internal val delegate: KtInstant) : Comparable<Insta
6666
* Parse an ISO-8601 formatted string into an [Instant]
6767
*/
6868
public actual fun fromIso8601(ts: String): Instant {
69-
val parseException = lazy { ParseException(ts, "Failed to parse $ts into an ISO-8601 timestamp", 0) }
69+
val parseException = ParseException(ts, "Failed to parse $ts into an ISO-8601 timestamp", 0)
7070

7171
listOf(
7272
{ DateTimeFormats.ISO_8601.parse(ts).apply { if (second == 60) second = 59 }.toInstantUsingOffset() },
@@ -76,11 +76,11 @@ public actual class Instant(internal val delegate: KtInstant) : Comparable<Insta
7676
try {
7777
return Instant(parseFn())
7878
} catch (e: IllegalArgumentException) {
79-
parseException.value.addSuppressed(e)
79+
parseException.addSuppressed(e)
8080
}
8181
}
8282

83-
throw parseException.value
83+
throw parseException
8484
}
8585

8686
/**

0 commit comments

Comments
 (0)