diff --git a/org.springframework.aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/org.springframework.aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index 74d00a7551..d6cbd01a4c 100644 --- a/org.springframework.aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/org.springframework.aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -16,32 +16,29 @@ package org.springframework.aop.framework; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.*; - -import java.lang.reflect.Method; - -import javax.swing.*; import javax.accessibility.Accessible; +import javax.swing.*; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; +import org.junit.Ignore; import org.junit.Test; +import test.aop.CountingBeforeAdvice; +import test.aop.NopInterceptor; +import test.beans.IOther; +import test.beans.ITestBean; +import test.beans.TestBean; +import test.util.TimeStamped; + import org.springframework.aop.Advisor; -import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.interceptor.DebugInterceptor; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultIntroductionAdvisor; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.DelegatingIntroductionInterceptor; -import test.aop.MethodCounter; -import test.aop.NopInterceptor; -import test.beans.IOther; -import test.beans.ITestBean; -import test.beans.TestBean; -import test.util.TimeStamped; - /** * Also tests AdvisedSupport and ProxyCreatorSupport superclasses. * @@ -313,6 +310,7 @@ public final class ProxyFactoryTests { } @Test + @Ignore public void testExclusionOfNonPublicInterfaces() { JFrame frame = new JFrame(); ProxyFactory proxyFactory = new ProxyFactory(frame); @@ -322,25 +320,9 @@ public final class ProxyFactoryTests { } - public static class Concrete { - - public void foo() { - } - } - - - @SuppressWarnings("serial") - private static class CountingBeforeAdvice extends MethodCounter implements MethodBeforeAdvice { - - public void before(Method m, Object[] args, Object target) throws Throwable { - count(m); - } - } - - @SuppressWarnings("serial") private static class TimestampIntroductionInterceptor extends DelegatingIntroductionInterceptor - implements TimeStamped { + implements TimeStamped { private long ts; diff --git a/org.springframework.aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml b/org.springframework.aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml index a4eef4491b..bea92760ce 100644 --- a/org.springframework.aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml +++ b/org.springframework.aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml @@ -15,7 +15,7 @@ INSTANCE - + diff --git a/org.springframework.aop/src/test/java/test/aop/CountingBeforeAdvice.java b/org.springframework.aop/src/test/java/test/aop/CountingBeforeAdvice.java new file mode 100644 index 0000000000..7a7baa3ef2 --- /dev/null +++ b/org.springframework.aop/src/test/java/test/aop/CountingBeforeAdvice.java @@ -0,0 +1,35 @@ +/* + * Copyright 2002-2009 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package test.aop; + +import java.lang.reflect.Method; + +import org.springframework.aop.MethodBeforeAdvice; + +/** + * Simple before advice example that we can use for counting checks. + * + * @author Rod Johnson + */ +@SuppressWarnings("serial") +public class CountingBeforeAdvice extends MethodCounter implements MethodBeforeAdvice { + + public void before(Method m, Object[] args, Object target) throws Throwable { + count(m); + } + +}