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

Immutable list properties can cause NPE if used incorrectly #21

Closed
miho opened this issue Feb 10, 2019 · 0 comments
Closed

Immutable list properties can cause NPE if used incorrectly #21

miho opened this issue Feb 10, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@miho
Copy link
Owner

miho commented Feb 10, 2019

Immutables can only be initialized via builders. While for single valued properties null is valid, it is not for collection properties. They should be lazily initialized with an empty unmodifiable list. This bug does not breach the immutability contract but it causes the wrong exception.

@miho miho added the bug Something isn't working label Feb 10, 2019
@miho miho closed this as completed Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant