Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,6 @@ import java.io.Serializable;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
|
||||
@@ -60,7 +59,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProxyIsJustInterface() throws Throwable {
|
||||
public void testProxyIsJustInterface() {
|
||||
TestBean raw = new TestBean();
|
||||
raw.setAge(32);
|
||||
AdvisedSupport pc = new AdvisedSupport(ITestBean.class);
|
||||
@@ -73,7 +72,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInterceptorIsInvokedWithNoTarget() throws Throwable {
|
||||
public void testInterceptorIsInvokedWithNoTarget() {
|
||||
// Test return value
|
||||
final int age = 25;
|
||||
MethodInterceptor mi = (invocation -> age);
|
||||
@@ -87,7 +86,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTargetCanGetInvocationWithPrivateClass() throws Throwable {
|
||||
public void testTargetCanGetInvocationWithPrivateClass() {
|
||||
final ExposedInvocationTestBean expectedTarget = new ExposedInvocationTestBean() {
|
||||
@Override
|
||||
protected void assertions(MethodInvocation invocation) {
|
||||
@@ -128,7 +127,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEqualsAndHashCodeDefined() throws Exception {
|
||||
public void testEqualsAndHashCodeDefined() {
|
||||
AdvisedSupport as = new AdvisedSupport(Named.class);
|
||||
as.setTarget(new Person());
|
||||
JdkDynamicAopProxy aopProxy = new JdkDynamicAopProxy(as);
|
||||
@@ -139,7 +138,7 @@ public class JdkDynamicProxyTests extends AbstractAopProxyTests implements Seria
|
||||
}
|
||||
|
||||
@Test // SPR-13328
|
||||
public void testVarargsWithEnumArray() throws Exception {
|
||||
public void testVarargsWithEnumArray() {
|
||||
ProxyFactory proxyFactory = new ProxyFactory(new VarargTestBean());
|
||||
VarargTestInterface proxy = (VarargTestInterface) proxyFactory.getProxy();
|
||||
assertTrue(proxy.doWithVarargs(MyEnum.A, MyOtherEnum.C));
|
||||
|
||||
Reference in New Issue
Block a user