BREAKING: Nullability Changes #1089
lauzadis
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
An upcoming release of the AWS SDK for Kotlin modifies the nullability of many generated types.
Release date
This feature will ship with the v0.33.0-beta release planned for 10/26/2023.
What's changing
The code generation for smithy-kotlin was updated to handle Smithy IDL 2.0 member optionality.
This allows members marked with
@required
or@default
to be treated as non-nullableT
instead ofT?
(with some exceptions). This reduces needless usage of the safe call operator (?.
), elvis operator (?:
), and not-null assertion operator (!!
) in many cases.How to migrate
This change is widespread. If your code fails to compile after updating check to see if the type changed to be nullable or non-nullable and handle accordingly.
Additional resources
If you have any questions concerning this change, please feel free to engage with us in this discussion. If you encounter a bug with these changes, please file an issue.
Beta Was this translation helpful? Give feedback.
All reactions