Skip to content

Commit 45dd2d9

Browse files
committed
Polishing.
Original pull request #2933 See #2902
1 parent 9dbd41e commit 45dd2d9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/org/springframework/data/jpa/provider/HibernateJpaParametersParameterAccessor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.springframework.data.repository.query.Parameter;
2626
import org.springframework.data.repository.query.Parameters;
2727
import org.springframework.data.repository.query.ParametersParameterAccessor;
28+
import org.springframework.lang.Nullable;
2829

2930
/**
3031
* {@link org.springframework.data.repository.query.ParameterAccessor} based on an {@link Parameters} instance. In
@@ -73,10 +74,11 @@ public Object getValue(Parameter parameter) {
7374
* Utility method to potentially unwrap {@link TypedParameterValue}s. For certain operations, Hibernate doesn't
7475
* properly support them, so we must unwrap them before passing through.
7576
*
76-
* @param extractedValue
77+
* @param extractedValue the unwrapped value of the original value if there is nothing to unwrap.
7778
* @return the value behind a {@link TypedParameterValue}
7879
*/
7980
@Override
81+
@Nullable
8082
public Object potentiallyUnwrap(Object extractedValue) {
8183

8284
if (extractedValue instanceof TypedParameterValue) {

src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public <T> T getValue(Parameter parameter) {
4848
/**
4949
* Utility method to potentially unwrap certain provider-specific types. For general JPA, there are none, so it's a pass-through.
5050
*
51-
* @param extractedValue
51+
* @param extractedValue the unwrapped value or the input value if there is nothing to unwrap.
5252
* @return the same value passed in
5353
*/
5454
@Nullable

0 commit comments

Comments
 (0)