Skip to content

Commit

Permalink
Clean up warnings in Gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Jul 10, 2019
1 parent 1728bf1 commit af18d71
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -53,7 +53,7 @@ public void testMethodValidationInterceptor() {
ProxyFactory proxyFactory = new ProxyFactory(bean);
proxyFactory.addAdvice(new MethodValidationInterceptor());
proxyFactory.addAdvisor(new AsyncAnnotationAdvisor());
doTestProxyValidation((MyValidInterface) proxyFactory.getProxy());
doTestProxyValidation((MyValidInterface<?>) proxyFactory.getProxy());
}

@Test
Expand All @@ -69,6 +69,7 @@ public void testMethodValidationPostProcessor() {
ac.close();
}

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

@Test
@SuppressWarnings("resource")
public void testLazyValidatorForMethodValidation() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(
LazyMethodValidationConfig.class, CustomValidatorBean.class,
Expand All @@ -96,6 +98,7 @@ public void testLazyValidatorForMethodValidation() {
}

@Test
@SuppressWarnings("resource")
public void testLazyValidatorForMethodValidationWithProxyTargetClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(
LazyMethodValidationConfigWithProxyTargetClass.class, CustomValidatorBean.class,
Expand Down

0 comments on commit af18d71

Please sign in to comment.