Clean up warnings in Gradle build

This commit is contained in:
Sam Brannen
2019-07-10 16:59:08 +02:00
parent 1728bf17fc
commit af18d71bc2

View File

@@ -53,7 +53,7 @@ public class MethodValidationTests {
ProxyFactory proxyFactory = new ProxyFactory(bean);
proxyFactory.addAdvice(new MethodValidationInterceptor());
proxyFactory.addAdvisor(new AsyncAnnotationAdvisor());
doTestProxyValidation((MyValidInterface) proxyFactory.getProxy());
doTestProxyValidation((MyValidInterface<?>) proxyFactory.getProxy());
}
@Test
@@ -69,6 +69,7 @@ public class MethodValidationTests {
ac.close();
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void doTestProxyValidation(MyValidInterface proxy) {
assertThat(proxy.myValidMethod("value", 5)).isNotNull();
assertThatExceptionOfType(ValidationException.class).isThrownBy(() ->
@@ -88,6 +89,7 @@ public class MethodValidationTests {
}
@Test
@SuppressWarnings("resource")
public void testLazyValidatorForMethodValidation() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(
LazyMethodValidationConfig.class, CustomValidatorBean.class,
@@ -96,6 +98,7 @@ public class MethodValidationTests {
}
@Test
@SuppressWarnings("resource")
public void testLazyValidatorForMethodValidationWithProxyTargetClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(
LazyMethodValidationConfigWithProxyTargetClass.class, CustomValidatorBean.class,