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

We should opt for immutability when we can #66

Open
xibz opened this issue Jan 5, 2024 · 1 comment
Open

We should opt for immutability when we can #66

xibz opened this issue Jan 5, 2024 · 1 comment

Comments

@xibz
Copy link

xibz commented Jan 5, 2024

When constructing objects, we can freely change them whenever via the setters. I would not to not allow for this and go with a more immutable approach.

@aalmiray
Copy link
Contributor

The jsonschema2pojo plugin allows generating builders associated with pojos, that way pojo classes may remain immutable while the builders provide mutability. However, this would constitute a breaking change in API usage. Given that the API is still pre 1.0.0 is permissible but such change (if green lighted) must be communicated in advance to consumers.

cc: @afrittoli @rjalander

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

No branches or pull requests

2 participants