Skip to content
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

fix(java): handle null-able collections correctly #986

Merged
merged 2 commits into from
Nov 14, 2019

Conversation

RomainMuller
Copy link
Contributor

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


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

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
@RomainMuller RomainMuller requested review from bmaizels and a team as code owners November 14, 2019 09:34
@RomainMuller RomainMuller removed the request for review from bmaizels November 14, 2019 09:34
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Nov 14, 2019

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Nov 14, 2019
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit e88e5e2 into master Nov 14, 2019
@mergify mergify bot deleted the rmuller/fix-unmodifiable-lists-java-bug branch November 14, 2019 14:25
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants