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

Querydsl generates classes that throw compiler warnings since JDK 21 #387

Closed
Plondrein opened this issue Apr 15, 2024 · 0 comments · Fixed by #388
Closed

Querydsl generates classes that throw compiler warnings since JDK 21 #387

Plondrein opened this issue Apr 15, 2024 · 0 comments · Fixed by #388

Comments

@Plondrein
Copy link
Contributor

As mentioned in querydsl/querydsl#3606 (comment):

Observed vs. expected behavior
If I compile generates by QueryDSL 5.0 classes I see JDK 21 compiler throw a lot of warnings like:

QAuditableEntity.java:[32,70] possible 'this' escape before subclass is fully initialized
All of them come from new Xlint option called this-escape, so I would propose either fix that by not calling overridable methods from constructors or adding @SuppressWarnings("this-escape") to all generated constructors.

Steps to reproduce
Have a project with any JPA entity and generate QueryDSL code for it.
Use JDK 21 compiler.

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

Successfully merging a pull request may close this issue.

1 participant