Browse Source

Clean up compiler warnings

pull/29903/head
Sam Brannen 3 years ago
parent
commit
e3fb0a39a2
  1. 3
      spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessorTests.java
  2. 2
      spring-context/src/test/java/org/springframework/validation/beanvalidation/MethodValidationTests.java
  3. 10
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionFunction.java

3
spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationBeanRegistrationAotProcessorTests.java

@ -131,12 +131,14 @@ class BeanValidationBeanRegistrationAotProcessorTests {
private static class MethodParameterLevelConstraint { private static class MethodParameterLevelConstraint {
@SuppressWarnings("unused")
public String hello(@Exists String name) { public String hello(@Exists String name) {
return "Hello " + name; return "Hello " + name;
} }
} }
@SuppressWarnings("unused")
private static class ConstructorParameterLevelConstraint { private static class ConstructorParameterLevelConstraint {
private final String name; private final String name;
@ -151,6 +153,7 @@ class BeanValidationBeanRegistrationAotProcessorTests {
} }
@SuppressWarnings("unused")
private static class PropertyLevelConstraint { private static class PropertyLevelConstraint {
@Exists @Exists

2
spring-context/src/test/java/org/springframework/validation/beanvalidation/MethodValidationTests.java

@ -196,7 +196,7 @@ public class MethodValidationTests {
public Object invoke(MethodInvocation invocation) throws Throwable { public Object invoke(MethodInvocation invocation) throws Throwable {
Method method; Method method;
try { try {
method = ClassUtils.getMethod(MyValidBean.class, invocation.getMethod().getName(), null); method = ClassUtils.getMethod(MyValidBean.class, invocation.getMethod().getName(), (Class<?>[]) null);
} }
catch (IllegalStateException ex) { catch (IllegalStateException ex) {
method = BridgeMethodResolver.findBridgedMethod( method = BridgeMethodResolver.findBridgedMethod(

10
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionFunction.java

@ -22,17 +22,17 @@ import io.r2dbc.spi.Connection;
/** /**
* Union type combining {@link Function} and {@link SqlProvider} to expose the SQL that is * Union type combining {@link Function} and {@link SqlProvider} to expose the SQL
* related to the underlying action. The SqlProvider can support lazy / generate once semantics, * that is related to the underlying action. The {@code SqlProvider} can support
* in which case {@link #getSql()} can be {@code null} until the {@code #apply(Connection)} * lazy / generate-once semantics, in which case {@link #getSql()} can be {@code null}
* method is invoked. * until the {@code #apply(Connection)} method is invoked.
* *
* @author Mark Paluch * @author Mark Paluch
* @author Simon Baslé * @author Simon Baslé
* @since 5.3 * @since 5.3
* @param <R> the type of the result of the function. * @param <R> the type of the result of the function.
*/ */
@SuppressWarnings("rawtypes")
sealed interface ConnectionFunction<R> extends Function<Connection, R>, SqlProvider sealed interface ConnectionFunction<R> extends Function<Connection, R>, SqlProvider
permits DelegateConnectionFunction, ResultFunction { permits DelegateConnectionFunction, ResultFunction {
} }

Loading…
Cancel
Save