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

API consistency and Java 17 future #70

Closed
graemerocher opened this issue Nov 5, 2022 · 3 comments · Fixed by #75
Closed

API consistency and Java 17 future #70

graemerocher opened this issue Nov 5, 2022 · 3 comments · Fixed by #75
Labels
design Improvements or additions to design vote Something to vote on
Milestone

Comments

@graemerocher
Copy link
Contributor

Description

So in general I think we should be planning for a future where Java 17 records are more broadly adopted.

That means considering accessors for the API (getters getContent() vs content()). The current API is inconsistent in this aspect. For example the Limit class uses record style accessors while Page, Pageable etc, use getters.

Can we have a vote on what we should use? It seems to me with records we should be considering record style accessors.

@graemerocher graemerocher added the vote Something to vote on label Nov 5, 2022
@graemerocher
Copy link
Contributor Author

Vote here for record style accessors

@graemerocher
Copy link
Contributor Author

Vote here for JavaBean style accessors

@graemerocher graemerocher added the design Improvements or additions to design label Nov 5, 2022
@njr-11
Copy link
Contributor

njr-11 commented Nov 5, 2022

Page might not be a good example because it isn't clear if the content is a property of the page. But for Limit and Pageable which more clearly correspond to a collection of properties, consistency with record seems like an excellent fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Improvements or additions to design vote Something to vote on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants