-
Notifications
You must be signed in to change notification settings - Fork 1.5k
SimpleJPARepository: Methods accessing metadata.getComment() without Null-Check produce NPE #2716
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
Comments
Indeed, there are spots where the invoke of that method did a null check, but other spots where it does not. |
I added additional |
@gregturn Unfortunately the commits f40b39c and b0aa2b6 has not been pushed to the 3.0.x branch, so they were not a part of the 3.0.1 release. Could you please add them to the 3.0.x branch, so that they are at least included in next release 3.0.2? Thanks. P.S: Maybe @mp911de can do this also ... :-) |
It's possible to apply hints and hit a NullPointerException. Resolves #2716.
I believe this was merged to |
Hi there,
Stumbled upon a Null Pointer Exception during Migration to Spring Boot 3.0.0 (and spring-data-jpa 3.0.0) that seems to be raised when accessing the "getComment" method on the metadata field of SimpleJPARepository:
The two methods "applyQueryHints" and "applyQueryHintsForCount()" don't perform a null check on the metadata field of SimpleJPARepository (which is annotated as @nullable), e.g.:
In other methods of the repository, it seems to be correct, e.g.:
Thanks for any ideas for smooth workarounds or other input,
Joerg
The text was updated successfully, but these errors were encountered: