Clean up warnings in Gradle build

This commit is contained in:
Sam Brannen
2024-05-24 13:29:21 +02:00
parent 77f7da01e4
commit dac18a3ff1
4 changed files with 13 additions and 9 deletions

View File

@@ -41,8 +41,7 @@ class AspectProxyFactoryTests {
@Test
void testWithNonAspect() {
AspectJProxyFactory proxyFactory = new AspectJProxyFactory(new TestBean());
assertThatIllegalArgumentException().isThrownBy(() ->
proxyFactory.addAspect(TestBean.class));
assertThatIllegalArgumentException().isThrownBy(() -> proxyFactory.addAspect(TestBean.class));
}
@Test
@@ -78,8 +77,7 @@ class AspectProxyFactoryTests {
@Test
void testWithInstanceWithNonAspect() {
AspectJProxyFactory pf = new AspectJProxyFactory();
assertThatIllegalArgumentException().isThrownBy(() ->
pf.addAspect(new TestBean()));
assertThatIllegalArgumentException().isThrownBy(() -> pf.addAspect(new TestBean()));
}
@Test
@@ -119,6 +117,7 @@ class AspectProxyFactoryTests {
}
@Test // SPR-13328
@SuppressWarnings("unchecked")
public void testProxiedVarargsWithEnumArray() {
AspectJProxyFactory proxyFactory = new AspectJProxyFactory(new TestBean());
proxyFactory.addAspect(LoggingAspectOnVarargs.class);
@@ -127,6 +126,7 @@ class AspectProxyFactoryTests {
}
@Test // SPR-13328
@SuppressWarnings("unchecked")
public void testUnproxiedVarargsWithEnumArray() {
AspectJProxyFactory proxyFactory = new AspectJProxyFactory(new TestBean());
proxyFactory.addAspect(LoggingAspectOnSetter.class);