-
Notifications
You must be signed in to change notification settings - Fork 1.5k
SimpleJpaRepository.delete(Specification<T> spec) throws NullPointerException [Kotlin] #3439
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
Thanks for reporting. Care to give us a bit more context of what you're trying to archive? |
I'll give you all details : I'm trying to play this code :
But on the code of SimpleJpaRepository that implement the JpaSpecificationExecutor I hit the following line of code :
with that interface :
I suspect that Kotlin don't take @nullable when compiling those java class and a NPE happen because "null" is literally passed to a non null parameter. |
That's a shortcoming of the Specification vs. Criteria Query design. Specifications have been designed for select queries and at some point, we enabled these for At some point, we need to revisit our arrangement and find a path forward. |
this means |
Hello,
I have a problem using JpaSpecificationExecutor.delete using a Specification Object
I'm using Kotlin and the @nullable on top of the toPredicate function of Specification used line 477 with the null parameter of query seemed to be the problem
java.lang.NullPointerException: Parameter specified as non-null is null: ... at org.springframework.data.jpa.repository.support.SimpleJpaRepository.delete(SimpleJpaRepository.java:477)
The text was updated successfully, but these errors were encountered: