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

Using getRequiredAdapter in RedisQueryEngine to avoid NPE #2800

Closed
junghoon-vans opened this issue Dec 11, 2023 · 3 comments
Closed

Using getRequiredAdapter in RedisQueryEngine to avoid NPE #2800

junghoon-vans opened this issue Dec 11, 2023 · 3 comments
Labels
type: task A general task

Comments

@junghoon-vans
Copy link
Contributor

The getAdapter used by the RedisQueryEngine logic to get the adapter can return null.
To avoid this, we can use getRequiredAdapter.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 11, 2023
@mp911de mp911de added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 11, 2023
@mp911de
Copy link
Member

mp911de commented Dec 11, 2023

Did you encounter a NPE or how did you find out about the issue?

@junghoon-vans
Copy link
Contributor Author

@mp911de I didn't experience any NPEs myself, I just thought I should fix anything in the source code that might cause an error.

I'm currently working on creating a Spring Data Implementation, and in the process I came across this and decided to open an issue.

@mp911de
Copy link
Member

mp911de commented Dec 11, 2023

Alright, thanks for the detail.

@mp911de mp911de added this to the 3.1.7 (2023.0.7) milestone Dec 11, 2023
mp911de pushed a commit that referenced this issue Dec 11, 2023
We now use getRequiredAdapter() instead of getAdapter() to enforce either an object or a proper exception.

Closes #2800
Original pull request: #2801
mp911de pushed a commit that referenced this issue Dec 11, 2023
We now use getRequiredAdapter() instead of getAdapter() to enforce either an object or a proper exception.

Closes #2800
Original pull request: #2801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants