Skip to content

SimpleJPARepository: existsById() throws NPE if metadata is null #2897

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

Closed
patdlanger opened this issue Apr 4, 2023 · 3 comments
Closed

SimpleJPARepository: existsById() throws NPE if metadata is null #2897

patdlanger opened this issue Apr 4, 2023 · 3 comments
Assignees
Labels
type: bug A general bug

Comments

@patdlanger
Copy link

Hi there,
I guess this is somewhat related to #2716

In existsById() there is no null-check so it can produce NPEs when trying to access metadata.getComment()

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 4, 2023
@schauder
Copy link
Contributor

schauder commented Apr 5, 2023

Please provide a Minimimal Reproducable Example, preferable as a Github repository. Make sure to include the database, either as an in memory database or if that is not possible using Testcontainers.

@patdlanger
Copy link
Author

@schauder Hi I uploaded a simple example here https://github.com/patdlanger/existsbyid

@schauder schauder added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 18, 2023
schauder added a commit that referenced this issue Apr 18, 2023
@schauder schauder added this to the 3.0.6 (2022.0.6) milestone Apr 18, 2023
@schauder
Copy link
Contributor

Thanks for reporting the issue. It's fixed and ported back to 3.0.6

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

No branches or pull requests

3 participants