docs: annotate QueryModifiers and SchemaAndTable as @Immutable - #1900
Open
velo wants to merge 1 commit into
Open
docs: annotate QueryModifiers and SchemaAndTable as @Immutable#1900velo wants to merge 1 commit into
velo wants to merge 1 commit into
Conversation
Signed-off-by: Marvin Froeder <velo.br@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Annotation only, no behaviour change.
@ImmutableisRetentionPolicy.CLASSand marks the types in this codebasethat are already value-shaped: final fields only, value-based
equals, noidentity dependence.
PathMetadata,JoinExpression,JoinFlag,OrderSpecifier,Templateand itsElementsubclasses,ConstantImplandfriends all carry it.
Two types that meet the same bar were missing it:
QueryModifiers— final class, two final fields, valueequals/hashCodeSchemaAndTable— two final fields, valueequals/hashCodeThis keeps the annotated set an accurate inventory of the value-shaped types,
which is the list you would work from for any future value-class migration
(JEP 401), and it is useful documentation regardless.
Deliberately not included, since both are breaking changes and belong in their
own discussion:
final— nothing in the repo extends either, but downstreamcode may
getSchema()→schema()) and the serialized formTesting
./mvnw -Pdev -pl :querydsl-sql -am test: 3952 tests, 0 failures.🤖 Generated with Claude Code
https://claude.ai/code/session_01WnNBe1GoG2SxfU3FN7bcAA