-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException when using CfnApi::getBinaryMediaTypes from Java #4316
Labels
Comments
ivoanjo
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 1, 2019
SomayaB
added
language/java
Related to Java bindings
@aws-cdk/aws-sam
Related to AWS Serverless Application Model
labels
Oct 1, 2019
SomayaB
added
needs-reproduction
This issue needs reproduction.
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 1, 2019
Yeah - looks like we need to check for |
This looks like a bug in our JSII Java bindings. Sending it @RomainMuller's way. |
nija-at
removed
@aws-cdk/aws-sam
Related to AWS Serverless Application Model
needs-reproduction
This issue needs reproduction.
labels
Oct 2, 2019
RomainMuller
added a commit
to aws/jsii
that referenced
this issue
Nov 14, 2019
When a `null` value was returned fro an optional collection (List or Map), it would be passed to the corresponding unmodifiable wrapper (`java.util.Collections.unmodifiable~`), however these method are not `null`-safe. This makes the wrapping conditional to the collection not being `null`. This addresses the cause of aws/aws-cdk#4316
mergify bot
pushed a commit
to aws/jsii
that referenced
this issue
Nov 14, 2019
When a `null` value was returned fro an optional collection (List or Map), it would be passed to the corresponding unmodifiable wrapper (`java.util.Collections.unmodifiable~`), however these method are not `null`-safe. This makes the wrapping conditional to the collection not being `null`. This addresses the cause of aws/aws-cdk#4316
eladb
pushed a commit
that referenced
this issue
Nov 19, 2019
Bug Fixes - java: handle null-able collections correctly (#986) (e88e5e2), closes #4316 - jsii: unable to depend on modules with private declarations (#995) (08c4294), closes #994 - kernel: cannot pass decorated structs to kernel as "any" (#997) (2bd3183), closes #5066 Features - jsii-config: introducing jsii-config (#981) (2bbf576), closes #904 - rosetta: extract and compile samples into "tablets" (#925) (eec44e1)
mergify bot
pushed a commit
that referenced
this issue
Nov 19, 2019
* feat: upgrade to jsii 0.20.7 Bug Fixes - java: handle null-able collections correctly (#986) (e88e5e2), closes #4316 - jsii: unable to depend on modules with private declarations (#995) (08c4294), closes #994 - kernel: cannot pass decorated structs to kernel as "any" (#997) (2bd3183), closes #5066 Features - jsii-config: introducing jsii-config (#981) (2bbf576), closes #904 - rosetta: extract and compile samples into "tablets" (#925) (eec44e1) * fix broken code * type a couple of more arrays * fix another untyped array * fix a couple more issues * another untyped array * more
eladb
pushed a commit
to cdklabs/decdk
that referenced
this issue
Jan 18, 2022
* feat: upgrade to jsii 0.20.7 Bug Fixes - java: handle null-able collections correctly (#986) (e88e5e2), closes aws/aws-cdk#4316 - jsii: unable to depend on modules with private declarations (#995) (08c4294), closes #994 - kernel: cannot pass decorated structs to kernel as "any" (#997) (2bd3183), closes aws/aws-cdk#5066 Features - jsii-config: introducing jsii-config (#981) (2bbf576), closes #904 - rosetta: extract and compile samples into "tablets" (#925) (eec44e1) * fix broken code * type a couple of more arrays * fix another untyped array * fix a couple more issues * another untyped array * more
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello there! 👋
I've just run into an issue while trying to read the
binaryMediaTypes
for a SAMCfnApi
. It looks like the Java generator does not properly handle when it gets anull
for the underlying field.Reproduction Steps
What I expected: An empty collection returned from
getBinaryMediaTypes()
(I can live with anull
too, it needed)Error Log
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: