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

feat(java): use immutable java implementations of JSII primitive collection types array and map #765

Merged
merged 1 commit into from
Sep 5, 2019

Conversation

spfink
Copy link
Contributor

@spfink spfink commented Sep 5, 2019

This commit wraps JSII primitive collections with immutable Java implementations. This includes wrapping arrays with Collections.unmodifiableList() and maps with Collections.unmodifiableMap(). This helps keep Java collections in sync with Node.

It also includes a refactor to the Java code generator around the generation of builders for objects.

Finally, it fixes a bug in the testing framework (negatives.test.ts) that was checking a value was not null rather than defined. This missed the case of the tests returning undefined.

Fixes #722


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

@spfink spfink requested review from bmaizels and a team as code owners September 5, 2019 22:28
@mergify
Copy link
Contributor

mergify bot commented Sep 5, 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 Sep 5, 2019
@bmaizels bmaizels added the pr/do-not-merge This PR should not be merged at this time. label Sep 5, 2019
@mergify mergify bot merged commit 5e713e3 into master Sep 5, 2019
@mergify mergify bot deleted the finks-bmaizels/immutable-maps-arrays branch September 5, 2019 22:47
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Sep 5, 2019
@bmaizels bmaizels requested a review from eladb September 5, 2019 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/do-not-merge This PR should not be merged at this time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java: represent arrays as UnmodifiableList
2 participants