Polishing.

Original pull request #2933
See #2902
This commit is contained in:
Jens Schauder
2023-05-02 09:38:27 +02:00
parent 9dbd41e377
commit 45dd2d9418
2 changed files with 4 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ import org.springframework.data.jpa.repository.query.JpaParametersParameterAcces
import org.springframework.data.repository.query.Parameter;
import org.springframework.data.repository.query.Parameters;
import org.springframework.data.repository.query.ParametersParameterAccessor;
import org.springframework.lang.Nullable;
/**
* {@link org.springframework.data.repository.query.ParameterAccessor} based on an {@link Parameters} instance. In
@@ -73,10 +74,11 @@ class HibernateJpaParametersParameterAccessor extends JpaParametersParameterAcce
* Utility method to potentially unwrap {@link TypedParameterValue}s. For certain operations, Hibernate doesn't
* properly support them, so we must unwrap them before passing through.
*
* @param extractedValue
* @param extractedValue the unwrapped value of the original value if there is nothing to unwrap.
* @return the value behind a {@link TypedParameterValue}
*/
@Override
@Nullable
public Object potentiallyUnwrap(Object extractedValue) {
if (extractedValue instanceof TypedParameterValue) {

View File

@@ -48,7 +48,7 @@ public class JpaParametersParameterAccessor extends ParametersParameterAccessor
/**
* Utility method to potentially unwrap certain provider-specific types. For general JPA, there are none, so it's a pass-through.
*
* @param extractedValue
* @param extractedValue the unwrapped value or the input value if there is nothing to unwrap.
* @return the same value passed in
*/
@Nullable