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 #3606

Open
krzyk opened this issue Oct 18, 2023 · 0 comments
Open

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

krzyk opened this issue Oct 18, 2023 · 0 comments
Labels

Comments

@krzyk
Copy link

krzyk commented Oct 18, 2023

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.

Environment

Querydsl version: 5.0.0

Querydsl module: querydsl-jpa

Database: not related

JDK: 21

Additional details

aven build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant