Translate nullability/optional typescript properties and methods into @Nullable / @NotNull annotations in the Java CDK #6026
Labels
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
jsii
This issue originates in jsii, or this feature must be implemented in jsii.
language/java
Related to Java bindings
Please add the
@Nullable
/@NotNull
annotations as appropriate when generating the Java CDK bindings from typescript constructs that are marked as optional or as not optional.Use Case
While Java has no native way of saying "this can be null" / "this is not expected to be null", the
@Nullable
/@NotNull
annotations are a way of doing that, enablingnull
and even better in my case
Proposed Solution
Add the annotations when generating Java code.
Other
There's also a feature request asking for this in the AWS Java SDK, which unfortunately has not been addressed yet.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: