Skip to content

Commit af18d71

Browse files
committed
Clean up warnings in Gradle build
1 parent 1728bf1 commit af18d71

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void testMethodValidationInterceptor() {
5353
ProxyFactory proxyFactory = new ProxyFactory(bean);
5454
proxyFactory.addAdvice(new MethodValidationInterceptor());
5555
proxyFactory.addAdvisor(new AsyncAnnotationAdvisor());
56-
doTestProxyValidation((MyValidInterface) proxyFactory.getProxy());
56+
doTestProxyValidation((MyValidInterface<?>) proxyFactory.getProxy());
5757
}
5858

5959
@Test
@@ -69,6 +69,7 @@ public void testMethodValidationPostProcessor() {
6969
ac.close();
7070
}
7171

72+
@SuppressWarnings({ "rawtypes", "unchecked" })
7273
private void doTestProxyValidation(MyValidInterface proxy) {
7374
assertThat(proxy.myValidMethod("value", 5)).isNotNull();
7475
assertThatExceptionOfType(ValidationException.class).isThrownBy(() ->
@@ -88,6 +89,7 @@ private void doTestProxyValidation(MyValidInterface proxy) {
8889
}
8990

9091
@Test
92+
@SuppressWarnings("resource")
9193
public void testLazyValidatorForMethodValidation() {
9294
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(
9395
LazyMethodValidationConfig.class, CustomValidatorBean.class,
@@ -96,6 +98,7 @@ public void testLazyValidatorForMethodValidation() {
9698
}
9799

98100
@Test
101+
@SuppressWarnings("resource")
99102
public void testLazyValidatorForMethodValidationWithProxyTargetClass() {
100103
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(
101104
LazyMethodValidationConfigWithProxyTargetClass.class, CustomValidatorBean.class,

0 commit comments

Comments
 (0)