Adopt to deprecation removals in Commons.

See #1944
This commit is contained in:
Mark Paluch
2024-11-25 08:43:18 +01:00
parent 996c851400
commit 8d9a87a06a

View File

@@ -15,8 +15,6 @@
*/
package org.springframework.data.r2dbc.repository.query;
import static org.springframework.data.repository.util.ClassUtils.*;
import java.lang.reflect.Method;
import java.util.Optional;
@@ -90,7 +88,7 @@ public class R2dbcQueryMethod extends QueryMethod {
this.mappingContext = mappingContext;
if (hasParameterOfType(method, Pageable.class)) {
if (ReflectionUtils.hasParameterOfType(method, Pageable.class)) {
TypeInformation<?> returnType = TypeInformation.fromReturnTypeOf(method);
@@ -111,7 +109,7 @@ public class R2dbcQueryMethod extends QueryMethod {
method.toString()));
}
if (hasParameterOfType(method, Sort.class)) {
if (ReflectionUtils.hasParameterOfType(method, Sort.class)) {
throw new IllegalStateException(String.format("Method must not have Pageable *and* Sort parameter; "
+ "Use sorting capabilities on Pageable instead; Offending method: %s", method.toString()));
}