[jboss-cvs] JBossAS SVN: r71188 - in projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop: annotatedAdviceParams and 60 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 24 00:11:53 EDT 2008
Author: flavia.rainone at jboss.com
Date: 2008-03-24 00:11:52 -0400 (Mon, 24 Mar 2008)
New Revision: 71188
Added:
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/TestContainer.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AbstractSerializeContainerTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotationImpl.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/InProcessProxyFileCreator.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixin.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface2.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxyFileCreator.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreator.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreatorDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyCacheKeyTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataInVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SimpleMetaDataInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect2.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect3.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect4.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect5.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor2.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor3.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor4.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor5.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java
Removed:
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxySerializer.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java
Modified:
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect2.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspectGenerics.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgInvalidTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidPOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsPOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointInvalidTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdvicePOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdviceTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAroundAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnAspectGenerics.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetCallerInvalidPOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetInvalidTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedcflow/Annotation.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/AnnotatedDeclareTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/SystemOutDecorator.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/ClassAnnotation.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/complex.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationoverride/AnnotationOverrideTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/ArrayReferenceTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/AOPTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/NamedInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/Person.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/ConfigTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/InvokedConfigs.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingannotated/TestException.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/BeforeAfterThrowingScopedTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/PerInstanceAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/ThrownByTestException.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingstack/ThrownByTestException.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/BridgeMethodWeavingTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SubPOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SuperPOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethodnotwoven/BridgeMethodTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/callerscope/CallerScopeTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/construction/ConstructionTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/constructortarget/ConstructorTargetTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/Annotation.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/ContainerTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/DeclareTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/SystemOutDecorator.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/DynamicTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/Interceptions.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MetadataInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MyInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/YourInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ConstructionInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ExtenderTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/SuperCallAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/field/FieldTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/inforesolve/ResolveAnnotationAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofannotated/InstanceOfAnnotatedTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofintroduced/InstanceofIntroducedTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/BypassInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/InvokeTargetTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/complex.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ClassPoolTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ScenarioLoader.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/scenario/ScenarioRunner.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/AnnotatedTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/Interceptions.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/AnnotatedDeclareTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/SystemOutDecorator.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/complex.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/traceable.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/methodhashing/MethodHashingTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/NotConstructionInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/PackageTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/pointcut/PointcutTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/Interceptions.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/PrecedenceTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotatedPOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializablePOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SomeInterface.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildThread.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildingChainTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncThread.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionAspectTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionPOJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/inheritedmcall/AOPTester.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/InnerClassTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/POJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop137/AnExtender.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop197/OwnConstructorTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/AnnotationOverrideTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/TestInterceptor.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/POJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/TestAspect.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/UnderscoreInFieldNameTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop398nosuchfield/POJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop442instancedomain/InstanceDomainTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop484superproxyadvised/SuperClassIsAdvisedByProxyTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/Interceptions.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/ScopeTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/POJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/Proxied.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioPropertyReaderFactory.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/Factory.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/GenerateClassesTestDelegate.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/WeaveManyClassesTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/BeforeAfterThrowingTestCase.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/TestException.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ClassTypeTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/FromVariableAlgorithmTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/GenericArrayTypeTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromArrayTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromClassTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromParamTypeTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromVariableTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeTest.java
projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/TypeVariableTest.java
Log:
Merging trunk changes.
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -38,6 +38,7 @@
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
* @see org.jboss.test.aop.annotatedAdviceParams.ArgAspect
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class ArgAspect
{
static boolean before1 = false;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect2.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect2.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspect2.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision: 64564 $
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class ArgAspect2 implements ArgPOJOInterface
{
public static boolean echoCalled = false;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspectGenerics.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspectGenerics.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgAspectGenerics.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -39,6 +39,7 @@
* @see org.jboss.test.aop.annotatedAdviceParams.ArgAspect
* @see org.jboss.test.aop.annotatedAdviceParams.ArgAspetInterfaces
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class ArgAspectGenerics
{
static boolean before1 = false;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgInvalidTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgInvalidTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgInvalidTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -36,6 +36,7 @@
*
* @see ArgsInvalidTestCase
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class ArgInvalidTestCase extends AOPTestWithSetup
{
private ArgsInvalidPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -44,6 +44,7 @@
* @see org.jboss.test.aop.annotatedAdviceParams.Arg2TestCase
* @see org.jboss.test.aop.arguments.ArgumentsTestCase
*/
+ at SuppressWarnings("cast")
public class ArgTestCase extends AOPTestWithSetup
{
private ArgsPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -35,6 +35,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class ArgsAspect
{
static boolean before1 = false;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidPOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidPOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidPOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -38,6 +38,7 @@
* @see ArgInvalidTestCase
* @see ArgsInvalidTestCase
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class ArgsInvalidPOJO
{
/* Object field1 */
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsInvalidTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "cast"})
public class ArgsInvalidTestCase extends AOPTestWithSetup
{
private ArgsInvalidPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsPOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsPOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsPOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class ArgsPOJO
{
public Object field1;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ArgsTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "cast"})
public class ArgsTestCase extends AOPTestWithSetup
{
private ArgsPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -48,6 +48,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("cast")
public class JoinPointAspect
{
static String beforeAdvice = null;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointInvalidTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointInvalidTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointInvalidTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -36,6 +36,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unused")
public class JoinPointInvalidTestCase extends AOPTestWithSetup
{
private JoinPointInvalidPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/JoinPointTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -43,6 +43,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings(value={"unchecked", "unused"})
public class JoinPointTestCase extends AOPTestWithSetup
{
private JoinPointPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdvicePOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdvicePOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdvicePOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,6 +26,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class OverloadedAdvicePOJO
{
public String text;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdviceTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdviceTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAdviceTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class OverloadedAdviceTestCase extends AOPTestWithSetup
{
private OverloadedAdvicePOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAroundAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAroundAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/OverloadedAroundAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -38,6 +38,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings(value="cast")
public class OverloadedAroundAspect
{
static String around1 = null;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnAspectGenerics.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnAspectGenerics.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnAspectGenerics.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -39,6 +39,7 @@
* @see org.jboss.test.aop.annotatedAdviceParams.ArgAspect
* @see org.jboss.test.aop.annotatedAdviceParams.ArgAspetInterfaces
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class ReturnAspectGenerics
{
static boolean around3 = false;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetCallerInvalidPOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetCallerInvalidPOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetCallerInvalidPOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "cast"})
public class TargetCallerInvalidPOJO
{
public TargetCallerInvalidPOJO(){}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetInvalidTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetInvalidTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetInvalidTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unused")
public class TargetInvalidTestCase extends AOPTestWithSetup
{
private TargetCallerInvalidPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/TargetTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unused")
public class TargetTestCase extends AOPTestWithSetup
{
private TargetCallerPOJO pojo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedcflow/Annotation.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedcflow/Annotation.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotatedcflow/Annotation.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -21,11 +21,14 @@
*/
package org.jboss.test.aop.annotatedcflow;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;;
/**
*
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at Retention(RetentionPolicy.RUNTIME)
public @interface Annotation
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/AnnotatedDeclareTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/AnnotatedDeclareTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/AnnotatedDeclareTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -35,6 +35,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class AnnotatedDeclareTestCase extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/SystemOutDecorator.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/SystemOutDecorator.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotateddeclare/SystemOutDecorator.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class SystemOutDecorator extends PrintStream
{
static PrintStream sysout = null;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,7 +26,6 @@
import junit.framework.TestSuite;
import org.jboss.aop.annotation.AnnotationElement;
-import org.jboss.aop.annotation.PortableAnnotationElement;
import org.jboss.annotation.factory.AnnotationCreator;
import org.jboss.aop.util.ConstructorComparator;
import org.jboss.test.aop.AOPTestWithSetup;
@@ -42,6 +41,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class AnnotationTester extends AOPTestWithSetup
{
public static Test suite()
@@ -119,7 +119,7 @@
complex c = null;
try
{
- Object[] annotations = PortableAnnotationElement.getVisibleAnnotations(BytecodePOJO.class);
+ Object[] annotations = AnnotationElement.getVisibleAnnotations(BytecodePOJO.class);
for (int i = 0 ; i < annotations.length ; i++)
{
if (complex.class.isAssignableFrom(annotations[i].getClass()))
@@ -207,7 +207,7 @@
try
{
- Object[] annotations = PortableAnnotationElement.getVisibleAnnotations(con);
+ Object[] annotations = AnnotationElement.getVisibleAnnotations(con);
for (int i = 0 ; i < annotations.length ; i++)
{
if (complex.class.isAssignableFrom(annotations[i].getClass()))
@@ -292,7 +292,7 @@
try
{
- Object[] annotations = PortableAnnotationElement.getVisibleAnnotations(con);
+ Object[] annotations = AnnotationElement.getVisibleAnnotations(con);
for (int i = 0 ; i < annotations.length ; i++)
{
if (complex.class.isAssignableFrom(annotations[i].getClass()))
@@ -417,7 +417,7 @@
try
{
- Object[] annotations = PortableAnnotationElement.getVisibleAnnotations(con);
+ Object[] annotations = AnnotationElement.getVisibleAnnotations(con);
for (int i = 0 ; i < annotations.length ; i++)
{
if (complex.class.isAssignableFrom(annotations[i].getClass()))
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/ClassAnnotation.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/ClassAnnotation.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/ClassAnnotation.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @version $Revision$
*/
@Target(ElementType.TYPE)@Retention(RetentionPolicy.RUNTIME)
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public @interface ClassAnnotation
{
Class value();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/complex.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/complex.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationc/complex.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @version $Revision$
*/
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})@Retention(RetentionPolicy.RUNTIME)
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public @interface complex
{
char ch();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationoverride/AnnotationOverrideTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationoverride/AnnotationOverrideTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/annotationoverride/AnnotationOverrideTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -51,6 +51,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class AnnotationOverrideTestCase extends AOPTestWithSetup
{
public AnnotationOverrideTestCase(String arg0)
@@ -82,14 +83,22 @@
container.setClass(Proxied.class);
container.initializeClassContainer();
- Some some = (Some)container.resolveAnnotation(Some.class);
+ Some some = container.resolveTypedAnnotation(Some.class);
assertNotNull(some);
- Other other = (Other)container.resolveAnnotation(Other.class);
+ some = (Some)container.resolveAnnotation(Some.class);
+ assertNotNull(some);
+ Other other = container.resolveTypedAnnotation(Other.class);
assertNull(other);
+ other = (Other)container.resolveAnnotation(Other.class);
+ assertNull(other);
Method m = Proxied.class.getDeclaredMethod("method");
+ some = container.resolveTypedAnnotation(m, Some.class);
+ assertNull(some);
some = (Some)container.resolveAnnotation(m, Some.class);
assertNull(some);
+ other = container.resolveTypedAnnotation(m, Other.class);
+ assertNotNull(other);
other = (Other)container.resolveAnnotation(m, Other.class);
assertNotNull(other);
assertEquals("method", other.value());
@@ -113,84 +122,132 @@
setupMetaData(advisor, c, m, f, classAnnotations, ctorAnnotations, methodAnnotations, fieldAnnotations);
}
- Some some = (Some)advisor.resolveAnnotation(Some.class);
+ Some some = advisor.resolveTypedAnnotation(Some.class);
assertNotNull(some);
- Other other = (Other)advisor.resolveAnnotation(Other.class);
+ some = (Some)advisor.resolveAnnotation(Some.class);
+ assertNotNull(some);
+ Other other = advisor.resolveTypedAnnotation(Other.class);
assertNull(other);
+ other = (Other)advisor.resolveAnnotation(Other.class);
+ assertNull(other);
- SomeAnnotation someAnn = (SomeAnnotation)advisor.resolveAnnotation(SomeAnnotation.class);
+ SomeAnnotation someAnn = advisor.resolveTypedAnnotation(SomeAnnotation.class);
assertNotNull(someAnn);
- OtherAnnotation otherAnn = (OtherAnnotation)advisor.resolveAnnotation(OtherAnnotation.class);
+ someAnn = (SomeAnnotation)advisor.resolveAnnotation(SomeAnnotation.class);
+ assertNotNull(someAnn);
+ OtherAnnotation otherAnn = advisor.resolveTypedAnnotation(OtherAnnotation.class);
assertNull(otherAnn);
+ otherAnn = (OtherAnnotation)advisor.resolveAnnotation(OtherAnnotation.class);
+ assertNull(otherAnn);
if (useMetaData)
{
- SomeMD someMD = (SomeMD)advisor.resolveAnnotation(SomeMD.class);
+ SomeMD someMD = advisor.resolveTypedAnnotation(SomeMD.class);
assertNotNull(someMD);
- OtherMD otherMD = (OtherMD)advisor.resolveAnnotation(OtherMD.class);
+ someMD = (SomeMD)advisor.resolveAnnotation(SomeMD.class);
+ assertNotNull(someMD);
+ OtherMD otherMD = advisor.resolveTypedAnnotation(OtherMD.class);
assertNull(otherMD);
+ otherMD = (OtherMD)advisor.resolveAnnotation(OtherMD.class);
+ assertNull(otherMD);
}
+ some = advisor.resolveTypedAnnotation(m, Some.class);
+ assertNull(some);
some = (Some)advisor.resolveAnnotation(m, Some.class);
assertNull(some);
+ other = advisor.resolveTypedAnnotation(m, Other.class);
+ assertNotNull(other);
other = (Other)advisor.resolveAnnotation(m, Other.class);
assertNotNull(other);
assertEquals("method", other.value());
+ someAnn = advisor.resolveTypedAnnotation(m, SomeAnnotation.class);
+ assertNull(some);
someAnn = (SomeAnnotation)advisor.resolveAnnotation(m, SomeAnnotation.class);
assertNull(some);
+ otherAnn = advisor.resolveTypedAnnotation(m, OtherAnnotation.class);
+ assertNotNull(otherAnn);
otherAnn = (OtherAnnotation)advisor.resolveAnnotation(m, OtherAnnotation.class);
assertNotNull(otherAnn);
assertEquals("method", otherAnn.value());
if (useMetaData)
{
- SomeMD someMD = (SomeMD)advisor.resolveAnnotation(m, SomeMD.class);
+ SomeMD someMD = advisor.resolveTypedAnnotation(m, SomeMD.class);
assertNull(someMD);
- OtherMD otherMD = (OtherMD)advisor.resolveAnnotation(m, OtherMD.class);
+ someMD = (SomeMD)advisor.resolveAnnotation(m, SomeMD.class);
+ assertNull(someMD);
+ OtherMD otherMD = advisor.resolveTypedAnnotation(m, OtherMD.class);
assertNotNull(otherMD);
+ otherMD = (OtherMD)advisor.resolveAnnotation(m, OtherMD.class);
+ assertNotNull(otherMD);
assertEquals("method", otherMD.value());
}
+ some = advisor.resolveTypedAnnotation(f, Some.class);
+ assertNull(some);
some = (Some)advisor.resolveAnnotation(f, Some.class);
assertNull(some);
+ other = advisor.resolveTypedAnnotation(f, Other.class);
+ assertNotNull(other);
other = (Other)advisor.resolveAnnotation(f, Other.class);
assertNotNull(other);
assertEquals("field", other.value());
+ someAnn = advisor.resolveTypedAnnotation(f, SomeAnnotation.class);
+ assertNull(some);
someAnn = (SomeAnnotation)advisor.resolveAnnotation(f, SomeAnnotation.class);
assertNull(some);
+ otherAnn = advisor.resolveTypedAnnotation(f, OtherAnnotation.class);
+ assertNotNull(other);
otherAnn = (OtherAnnotation)advisor.resolveAnnotation(f, OtherAnnotation.class);
assertNotNull(other);
assertEquals("field", other.value());
if (useMetaData)
{
- SomeMD someMD = (SomeMD)advisor.resolveAnnotation(f, SomeMD.class);
+ SomeMD someMD = advisor.resolveTypedAnnotation(f, SomeMD.class);
assertNull(someMD);
- OtherMD otherMD = (OtherMD)advisor.resolveAnnotation(f, OtherMD.class);
+ someMD = (SomeMD)advisor.resolveAnnotation(f, SomeMD.class);
+ assertNull(someMD);
+ OtherMD otherMD = advisor.resolveTypedAnnotation(f, OtherMD.class);
assertNotNull(otherMD);
+ otherMD = (OtherMD)advisor.resolveAnnotation(f, OtherMD.class);
+ assertNotNull(otherMD);
assertEquals("field", otherMD.value());
}
+ some = advisor.resolveTypedAnnotation(c, Some.class);
+ assertNull(some);
some = (Some)advisor.resolveAnnotation(c, Some.class);
assertNull(some);
+ other = advisor.resolveTypedAnnotation(c, Other.class);
+ assertNotNull(other);
other = (Other)advisor.resolveAnnotation(c, Other.class);
assertNotNull(other);
assertEquals("ctor", other.value());
+ someAnn = advisor.resolveTypedAnnotation(c, SomeAnnotation.class);
+ assertNull(some);
someAnn = (SomeAnnotation)advisor.resolveAnnotation(c, SomeAnnotation.class);
assertNull(some);
+ otherAnn = advisor.resolveTypedAnnotation(c, OtherAnnotation.class);
+ assertNotNull(other);
otherAnn = (OtherAnnotation)advisor.resolveAnnotation(c, OtherAnnotation.class);
assertNotNull(other);
assertEquals("ctor", other.value());
if (useMetaData)
{
- SomeMD someMD = (SomeMD)advisor.resolveAnnotation(c, SomeMD.class);
+ SomeMD someMD = advisor.resolveTypedAnnotation(c, SomeMD.class);
assertNull(someMD);
- OtherMD otherMD = (OtherMD)advisor.resolveAnnotation(c, OtherMD.class);
+ someMD = (SomeMD)advisor.resolveAnnotation(c, SomeMD.class);
+ assertNull(someMD);
+ OtherMD otherMD = advisor.resolveTypedAnnotation(c, OtherMD.class);
assertNotNull(otherMD);
+ otherMD = (OtherMD)advisor.resolveAnnotation(c, OtherMD.class);
+ assertNotNull(otherMD);
assertEquals("ctor", otherMD.value());
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/AOPArrayTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class AOPArrayTestCase extends AOPTestWithSetup
{
public AOPArrayTestCase(String name)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/ArrayReferenceTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/ArrayReferenceTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/array/ArrayReferenceTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -38,6 +38,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class ArrayReferenceTestCase extends AOPTestWithSetup
{
public ArrayReferenceTestCase(String name)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/AOPTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/AOPTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/AOPTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -38,6 +38,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class AOPTester extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/NamedInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/NamedInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/NamedInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class NamedInterceptor implements Interceptor
{
public static HashSet invoked = new HashSet();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/Person.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/Person.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/basic/Person.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -27,6 +27,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class Person
{
public Person()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/ConfigTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/ConfigTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/ConfigTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class ConfigTester extends AOPTestWithSetup
{
public static Test suite()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/InvokedConfigs.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/InvokedConfigs.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beanstyleconfig/InvokedConfigs.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked"})
public class InvokedConfigs
{
static ArrayList invokedConfs = new ArrayList();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingannotated/TestException.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingannotated/TestException.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingannotated/TestException.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,6 +26,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class TestException extends RuntimeException
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/BeforeAfterThrowingScopedTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/BeforeAfterThrowingScopedTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/BeforeAfterThrowingScopedTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class BeforeAfterThrowingScopedTestCase extends AOPTestWithSetup
{
public BeforeAfterThrowingScopedTestCase(String arg0)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -35,6 +35,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class CallerJoinpointScopedTestCase extends AOPTestWithSetup
{
public CallerJoinpointScopedTestCase(String arg)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/PerInstanceAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/PerInstanceAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/PerInstanceAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -22,7 +22,6 @@
package org.jboss.test.aop.beforeafterthrowingscoped;
import org.jboss.aop.advice.annotation.Thrown;
-import org.jboss.aop.joinpoint.Invocation;
/**
*
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/ThrownByTestException.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/ThrownByTestException.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/ThrownByTestException.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,6 +26,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class ThrownByTestException extends Exception
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingstack/ThrownByTestException.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingstack/ThrownByTestException.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/beforeafterthrowingstack/ThrownByTestException.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,6 +26,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class ThrownByTestException extends Exception
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/BridgeMethodWeavingTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/BridgeMethodWeavingTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/BridgeMethodWeavingTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -35,6 +35,7 @@
* @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
* @version $Revision
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class BridgeMethodWeavingTestCase extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SubPOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SubPOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SubPOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,6 +26,7 @@
* @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
* @version $Revision
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class SubPOJO extends SuperPOJO<java.util.ArrayList>
{
private java.util.ArrayList bar;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SuperPOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SuperPOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethod/SuperPOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -5,6 +5,7 @@
* @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
* @version $Revision
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class SuperPOJO<T extends java.util.AbstractList>
{
private T fooObject;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethodnotwoven/BridgeMethodTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethodnotwoven/BridgeMethodTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/bridgemethodnotwoven/BridgeMethodTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -42,6 +42,7 @@
* @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
* @version $Revision
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class BridgeMethodTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/callerscope/CallerScopeTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/callerscope/CallerScopeTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/callerscope/CallerScopeTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class CallerScopeTestCase extends AOPTestWithSetup
{
Caller caller = new Caller();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/construction/ConstructionTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/construction/ConstructionTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/construction/ConstructionTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class ConstructionTester extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/constructortarget/ConstructorTargetTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/constructortarget/ConstructorTargetTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/constructortarget/ConstructorTargetTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @author stale w. pedersen(stalep at conduct.no)
* @version
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class ConstructorTargetTester extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/Annotation.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/Annotation.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/Annotation.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -21,11 +21,15 @@
*/
package org.jboss.test.aop.container;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
*
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at Retention(RetentionPolicy.RUNTIME)
public @interface Annotation {
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/ContainerTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/ContainerTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/ContainerTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.aop.container;
+import gnu.trove.TLongObjectHashMap;
+
import java.lang.reflect.Method;
import junit.framework.Test;
@@ -69,8 +71,20 @@
invokeContainer(true);
}
- public void invokeContainer(boolean overriding) throws Throwable
+ public void testMethodInterceptorsPopulated() throws Throwable
{
+ AspectManager.maintainAdvisorMethodInterceptors = true;
+ checkMethodInterceptors(true);
+ }
+
+ public void testMethodInterceptorsNotPopulated() throws Throwable
+ {
+ AspectManager.maintainAdvisorMethodInterceptors = false;
+ checkMethodInterceptors(false);
+ }
+
+ private void invokeContainer(boolean overriding) throws Throwable
+ {
AspectManager manager = AspectManager.instance();
ClassContainer container = (overriding ) ? new ContainerWithChainOverriding("X", manager) : new ClassContainer("X", manager);
container.setClass(Child.class);
@@ -88,6 +102,32 @@
assertEquals(overriding, TestInterceptor.invoked);
}
+ private void checkMethodInterceptors(boolean maintainAdvisorMethodInterceptors) throws Exception
+ {
+ AspectManager manager = AspectManager.instance();
+ TestContainer advisor = new TestContainer("X", manager);
+ advisor.setClass(Child.class);
+ advisor.initializeClassContainer();
+ Child child = new Child();
+ Method method = child.getClass().getMethod("childMethod", new Class[0]);
+ long hash = MethodHashing.calculateHash(method);
+ MethodInfo info = advisor.getMethodInfo(hash);
+
+ TLongObjectHashMap methodInterceptors = advisor.getMethodInterceptors();
+ if (!maintainAdvisorMethodInterceptors)
+ {
+ assertNull(methodInterceptors);
+ }
+ else
+ {
+ assertNotNull(methodInterceptors);
+ MethodInfo info2 = (MethodInfo)methodInterceptors.get(hash);
+ assertNotNull(info2);
+ assertEquals(info, info2);
+ }
+
+ }
+
private MethodInvocation getMethodInvocation(ClassContainer advisor, String methodName, Object target) throws Exception
{
Method method = target.getClass().getMethod(methodName, new Class[0]);
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/TestContainer.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/container/TestContainer.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/TestContainer.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/container/TestContainer.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.container;
+
+import gnu.trove.TLongObjectHashMap;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.ClassContainer;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestContainer extends ClassContainer
+{
+ public TestContainer(String name, AspectManager manager)
+ {
+ super(name, manager);
+ }
+
+ public TLongObjectHashMap getMethodInterceptors()
+ {
+ return super.methodInterceptors;
+ }
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/DeclareTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/DeclareTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/DeclareTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -36,6 +36,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class DeclareTestCase extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/SystemOutDecorator.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/SystemOutDecorator.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/declare/SystemOutDecorator.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class SystemOutDecorator extends PrintStream
{
static PrintStream sysout = null;
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/duplicatemethod)
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.duplicatemethod;
-
-import java.lang.reflect.Method;
-
-import javassist.util.proxy.MethodFilter;
-import javassist.util.proxy.ProxyFactory;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.jboss.aop.Advised;
-
-/**
- * A DuplicateMethodTestCase.
- *
- * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
- * @version $Revision: 1.1 $
- */
-//TODO http://jira.jboss.com/jira/browse/JBAOP-540 Make extend AOPTestWithSetupAgain
- at SuppressWarnings({"unused", "unchecked", "cast"})
-public class DuplicateMethodTestCase extends TestCase/*AOPTestWithSetup*/
-{
-
- public DuplicateMethodTestCase(String name)
- {
- super(name);
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite("DuplicateMethodTestCase");
- suite.addTestSuite(DuplicateMethodTestCase.class);
- return suite;
- }
-
- public void testDupe() throws Exception
- {
- TestDupe testDupe = new TestDupe();
- assertTrue(testDupe instanceof Advised);
-
- System.out.println("Generating proxy");
- ProxyFactory f = new ProxyFactory();
- f.setSuperclass(TestDupe.class);
- f.setFilter(new MethodFilter() {
- public boolean isHandled(Method m) {
- // ignore finalize()
- return !m.getName().equals("finalize");
- }
- });
-
- System.out.println("Create");
- Class c = f.createClass();
- System.out.println("Created");
-
- TestDupe td = (TestDupe) c.newInstance();
- TestDupeInterceptor.invoked = false;
- td.foo();
- //If it fails on this line - it probably means the proxy was not woven correctly
- assertTrue(TestDupeInterceptor.invoked);
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/DuplicateMethodTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.duplicatemethod;
+
+import java.lang.reflect.Method;
+
+import javassist.util.proxy.MethodFilter;
+import javassist.util.proxy.ProxyFactory;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.jboss.aop.Advised;
+
+/**
+ * A DuplicateMethodTestCase.
+ *
+ * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+//TODO http://jira.jboss.com/jira/browse/JBAOP-540 Make extend AOPTestWithSetupAgain
+ at SuppressWarnings({"unused", "unchecked", "cast"})
+public class DuplicateMethodTestCase extends TestCase/*AOPTestWithSetup*/
+{
+
+ public DuplicateMethodTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("DuplicateMethodTestCase");
+ suite.addTestSuite(DuplicateMethodTestCase.class);
+ return suite;
+ }
+
+ public void testDupe() throws Exception
+ {
+ TestDupe testDupe = new TestDupe();
+ assertTrue(testDupe instanceof Advised);
+
+ System.out.println("Generating proxy");
+ ProxyFactory f = new ProxyFactory();
+ f.setSuperclass(TestDupe.class);
+ f.setFilter(new MethodFilter() {
+ public boolean isHandled(Method m) {
+ // ignore finalize()
+ return !m.getName().equals("finalize");
+ }
+ });
+
+ System.out.println("Create");
+ Class c = f.createClass();
+ System.out.println("Created");
+
+ TestDupe td = (TestDupe) c.newInstance();
+ TestDupeInterceptor.invoked = false;
+ td.foo();
+ //If it fails on this line - it probably means the proxy was not woven correctly
+ assertTrue(TestDupeInterceptor.invoked);
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.duplicatemethod;
-
-/**
- * A TestDupe.
- *
- * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public class TestDupe
-{
-
- public void foo()
- {
-
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupe.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.duplicatemethod;
+
+/**
+ * A TestDupe.
+ *
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestDupe
+{
+
+ public void foo()
+ {
+
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.duplicatemethod;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.joinpoint.Invocation;
-
-/**
- * A TestDupeInterceptor.
- *
- * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public class TestDupeInterceptor implements Interceptor
-{
- public static boolean invoked;
-
- public String getName()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Object invoke(Invocation invocation) throws Throwable
- {
- invoked = true;
- return invocation.invokeNext();
- }
-
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/duplicatemethod/TestDupeInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.duplicatemethod;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * A TestDupeInterceptor.
+ *
+ * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestDupeInterceptor implements Interceptor
+{
+ public static boolean invoked;
+
+ public String getName()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ invoked = true;
+ return invocation.invokeNext();
+ }
+
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/DynamicTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/DynamicTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/DynamicTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -43,6 +43,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial", "static-access"})
public class DynamicTester extends AOPTestWithSetup
{
public static Test suite()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/Interceptions.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/Interceptions.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/Interceptions.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,6 +26,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class Interceptions
{
private static ArrayList interceptions = new ArrayList();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MetadataInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MetadataInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MetadataInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class MetadataInterceptor implements Interceptor
{
//For instances
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MyInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MyInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/MyInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.MethodInvocation;
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class MyInterceptor implements Interceptor
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/YourInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/YourInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/YourInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.MethodInvocation;
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class YourInterceptor implements Interceptor
{
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies)
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,32 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.aop.ejb3dependencies;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public @interface Ann
-{
- String value();
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.ejb3dependencies;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public @interface Ann
+{
+ String value();
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,49 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.aop.ejb3dependencies;
-
-import java.lang.annotation.Annotation;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class AnnImpl implements Ann
-{
- String val;
-
- public AnnImpl(String val)
- {
- this.val = val;
- }
-
- public String value()
- {
- return val;
- }
-
- public Class<? extends Annotation> annotationType()
- {
- return Ann.class;
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.ejb3dependencies;
+
+import java.lang.annotation.Annotation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnImpl implements Ann
+{
+ String val;
+
+ public AnnImpl(String val)
+ {
+ this.val = val;
+ }
+
+ public String value()
+ {
+ return val;
+ }
+
+ public Class<? extends Annotation> annotationType()
+ {
+ return Ann.class;
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,50 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.aop.ejb3dependencies;
-
-import java.lang.reflect.Method;
-
-import org.jboss.aop.AspectManager;
-
-import junit.framework.TestCase;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class EJB3CompatibilityTestCase extends TestCase
-{
- public void testAnnotationRepository() throws Exception
- {
- @SuppressWarnings("unchecked")
- TestAdvisor advisor = new TestAdvisor("XXX", AspectManager.instance());
- Ann ann = (Ann)advisor.resolveAnnotation(Ann.class);
- assertNotNull(ann);
- assertEquals("Clazz", ann.value());
-
- Method m = this.getClass().getMethods()[0];
- ann = (Ann)advisor.resolveAnnotation(m, Ann.class);
- assertNotNull(ann);
- assertEquals("Member", ann.value());
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.ejb3dependencies;
+
+import java.lang.reflect.Method;
+
+import org.jboss.aop.AspectManager;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class EJB3CompatibilityTestCase extends TestCase
+{
+ public void testAnnotationRepository() throws Exception
+ {
+ @SuppressWarnings("unchecked")
+ TestAdvisor advisor = new TestAdvisor("XXX", AspectManager.instance());
+ Ann ann = (Ann)advisor.resolveAnnotation(Ann.class);
+ assertNotNull(ann);
+ assertEquals("Clazz", ann.value());
+
+ Method m = this.getClass().getMethods()[0];
+ ann = (Ann)advisor.resolveAnnotation(m, Ann.class);
+ assertNotNull(ann);
+ assertEquals("Member", ann.value());
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,74 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.aop.ejb3dependencies;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.ClassContainer;
-
-/**
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class TestAdvisor<T> extends ClassContainer
-{
- public TestAdvisor(String name, AspectManager manager)
- {
- super(name, manager);
- super.annotations = new TestAnnotationRepository();
- }
-
- org.jboss.aop.Advisor advisor = null;
- Method m;
- Constructor<?> c;
- Field f;
-
- @SuppressWarnings("unused")
- public void test()
- {
- Class<?> clazz = advisor.getClazz();
- }
-
- public org.jboss.aop.Advisor getAdvisor()
- {
- return advisor;
- }
-
- @SuppressWarnings("unchecked")
- protected Class<? extends T> getBeanClass()
- {
- return getAdvisor().getClazz();
- }
-
- @SuppressWarnings("unused")
- public void testResolveAnnotation(Class<? extends Annotation> annotation)
- {
- Object o = advisor.resolveAnnotation(annotation);
- o = advisor.resolveAnnotation(c, annotation);
- o = advisor.resolveAnnotation(m, annotation);
- advisor.resolveAnnotation(f, annotation);
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.ejb3dependencies;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.ClassContainer;
+
+/**
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAdvisor<T> extends ClassContainer
+{
+ public TestAdvisor(String name, AspectManager manager)
+ {
+ super(name, manager);
+ super.annotations = new TestAnnotationRepository();
+ }
+
+ org.jboss.aop.Advisor advisor = null;
+ Method m;
+ Constructor<?> c;
+ Field f;
+
+ @SuppressWarnings("unused")
+ public void test()
+ {
+ Class<?> clazz = advisor.getClazz();
+ }
+
+ public org.jboss.aop.Advisor getAdvisor()
+ {
+ return advisor;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected Class<? extends T> getBeanClass()
+ {
+ return getAdvisor().getClazz();
+ }
+
+ @SuppressWarnings("unused")
+ public void testResolveAnnotation(Class<? extends Annotation> annotation)
+ {
+ Object o = advisor.resolveAnnotation(annotation);
+ o = advisor.resolveAnnotation(c, annotation);
+ o = advisor.resolveAnnotation(m, annotation);
+ advisor.resolveAnnotation(f, annotation);
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,45 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.aop.ejb3dependencies;
-
-import java.lang.reflect.Member;
-
-import org.jboss.aop.annotation.AnnotationRepository;
-
-/**
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class TestAnnotationRepository extends AnnotationRepository
-{
-
- public Object resolveClassAnnotation(Class annotation)
- {
- return new AnnImpl("Clazz");
- }
-
- @SuppressWarnings("unchecked")
- public Object resolveAnnotation(Member m, Class annotation)
- {
- return new AnnImpl("Member");
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.ejb3dependencies;
+
+import java.lang.reflect.Member;
+
+import org.jboss.aop.annotation.AnnotationRepository;
+
+/**
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAnnotationRepository extends AnnotationRepository
+{
+
+ public Object resolveClassAnnotation(Class annotation)
+ {
+ return new AnnImpl("Clazz");
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object resolveAnnotation(Member m, Class annotation)
+ {
+ return new AnnImpl("Member");
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,45 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.aop.ejb3dependencies;
-
-import java.lang.reflect.Method;
-
-import org.jboss.aop.advice.Interceptor;
-
-/**
- * This test is not currently meant to run. It is there to ensure that we don't break EJB3's dependencies
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class TestJoinPointInfo
-{
- org.jboss.aop.MethodInfo info;
- @SuppressWarnings("unused")
- public void test()
- {
- Interceptor[] interceptor = info.interceptors;
- Method method = info.unadvisedMethod;
- }
-
-
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.ejb3dependencies;
+
+import java.lang.reflect.Method;
+
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ * This test is not currently meant to run. It is there to ensure that we don't break EJB3's dependencies
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestJoinPointInfo
+{
+ org.jboss.aop.MethodInfo info;
+ @SuppressWarnings("unused")
+ public void test()
+ {
+ Interceptor[] interceptor = info.interceptors;
+ Method method = info.unadvisedMethod;
+ }
+
+
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ConstructionInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ConstructionInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ConstructionInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class ConstructionInterceptor implements Interceptor
{
public static ArrayList interceptions = new ArrayList();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ExtenderTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ExtenderTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/ExtenderTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,7 @@
* @author <a href="stalep at conduct.no">Stale W. Pedersen</a>
* @version $Revision:
*/
+ at SuppressWarnings({"unused"})
public class ExtenderTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/SuperCallAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/SuperCallAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/extender/SuperCallAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class SuperCallAspect
{
public static int interceptions = 0;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/field/FieldTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/field/FieldTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/field/FieldTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -40,6 +40,7 @@
* @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
* @version $Revision
*/
+ at SuppressWarnings({"unused", "cast", "unchecked", "serial"})
public class FieldTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/inforesolve/ResolveAnnotationAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/inforesolve/ResolveAnnotationAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/inforesolve/ResolveAnnotationAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings("static-access")
public class ResolveAnnotationAspect
{
public static JoinPointBean joinPoint;
@@ -51,7 +52,7 @@
return;
}
- classAnnotation = (TestAnnotation)joinPoint.resolveClassAnnotation(TestAnnotation.class);
- joinpointAnnotation = (TestAnnotation)joinPoint.resolveAnnotation(TestAnnotation.class);
+ classAnnotation = joinPoint.resolveClassAnnotation(TestAnnotation.class);
+ joinpointAnnotation = joinPoint.resolveAnnotation(TestAnnotation.class);
}
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofannotated/InstanceOfAnnotatedTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofannotated/InstanceOfAnnotatedTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofannotated/InstanceOfAnnotatedTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -38,6 +38,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unchecked")
public class InstanceOfAnnotatedTester extends AOPTestWithSetup
{
public static Test suite()
@@ -170,34 +171,35 @@
}
+
public void testTypeExpressions() throws Exception
{
Class introducedPOJO = IntroducedPOJO.class;
ClassAdvisor advisor = AspectManager.instance().getAdvisor(introducedPOJO);
- Introduced introduced = (Introduced) advisor.resolveAnnotation(Introduced.class);
+ Introduced introduced = advisor.resolveTypedAnnotation(Introduced.class);
assertNotNull("Class did not have the @Introduced annotation", introduced);
Constructor con = introducedPOJO.getConstructors()[0];
- introduced = (Introduced) advisor.resolveAnnotation(con, Introduced.class);
+ introduced = advisor.resolveTypedAnnotation(con, Introduced.class);
assertNotNull("Constructor did not have the @Introduced annotation", introduced);
- Introduced2 introduced2 = (Introduced2) advisor.resolveAnnotation(con, Introduced2.class);
+ Introduced2 introduced2 = advisor.resolveTypedAnnotation(con, Introduced2.class);
assertNotNull("Constructor did not have the @Introduced2 annotation", introduced2);
- Introduced3 introduced3 = (Introduced3) advisor.resolveAnnotation(con, Introduced3.class);
+ Introduced3 introduced3 = advisor.resolveTypedAnnotation(con, Introduced3.class);
assertNull("Constructor has the @Introduced3 annotation", introduced3);
Field field = introducedPOJO.getField("field");
- introduced = (Introduced) advisor.resolveAnnotation(field, Introduced.class);
+ introduced = advisor.resolveTypedAnnotation(field, Introduced.class);
assertNotNull("Field did not have the @Introduced annotation", introduced);
- introduced2 = (Introduced2) advisor.resolveAnnotation(field, Introduced2.class);
+ introduced2 = advisor.resolveTypedAnnotation(field, Introduced2.class);
assertNotNull("Field did not have the @Introduced2 annotation", introduced2);
Method method = introducedPOJO.getMethod("someMethod", new Class[]{Type.class, Type.class});
- introduced = (Introduced) advisor.resolveAnnotation(method, Introduced.class);
+ introduced = advisor.resolveTypedAnnotation(method, Introduced.class);
assertNotNull("Method did not have the @Introduced annotation", introduced);
- introduced2 = (Introduced2) advisor.resolveAnnotation(method, Introduced2.class);
+ introduced2 = advisor.resolveTypedAnnotation(method, Introduced2.class);
assertNotNull("Method did not have the @Introduced2 annotation", introduced2);
- introduced3 = (Introduced3) advisor.resolveAnnotation(method, Introduced3.class);
+ introduced3 = advisor.resolveTypedAnnotation(method, Introduced3.class);
assertNull("Method has the @Introduced3 annotation", introduced3);
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofintroduced/InstanceofIntroducedTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofintroduced/InstanceofIntroducedTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/instanceofintroduced/InstanceofIntroducedTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class InstanceofIntroducedTestCase extends AOPTestWithSetup
{
public static Test suite()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/BypassInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/BypassInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/BypassInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("static-access")
public class BypassInterceptor implements Interceptor
{
public static int invocations;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/InvokeTargetTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/InvokeTargetTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/invoketarget/InvokeTargetTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class InvokeTargetTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/complex.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/complex.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/complex.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,7 +30,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
-
+ at SuppressWarnings("unchecked")
@Retention(RetentionPolicy.RUNTIME)
public @interface complex
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ClassPoolTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ClassPoolTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ClassPoolTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* was configured to have all of its joinpoints prepared.
* @author Flavia Rainone
*/
+ at SuppressWarnings("unused")
public class ClassPoolTester extends AOPTestWithSetup
{
public ClassPoolTester(String name)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ScenarioLoader.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ScenarioLoader.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/ScenarioLoader.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -41,6 +41,7 @@
* @author Flavia Rainone
*
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class ScenarioLoader
{
private URL[] urls;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/scenario/ScenarioRunner.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/scenario/ScenarioRunner.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15/dynamic/common/scenario/ScenarioRunner.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -24,6 +24,7 @@
import java.util.Map;
+import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtField;
import javassist.CtMethod;
@@ -47,6 +48,7 @@
* @author Flavia Rainone
*
*/
+ at SuppressWarnings("unused")
public class ScenarioRunner
{
// Bindings used in the tests
@@ -323,7 +325,7 @@
*/
private static void loadPOJOData()
{
- Map cls = AspectManager.instance().getRegisteredCLs();
+ Map<ClassLoader, ClassPool> cls = AspectManager.getRegisteredCLs();
AOPClassPool classPool = (AOPClassPool) cls.get(POJO.class.getClassLoader());
try
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/AnnotatedTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/AnnotatedTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/AnnotatedTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -37,6 +37,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class AnnotatedTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/Interceptions.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/Interceptions.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/Interceptions.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class Interceptions
{
static ArrayList intercepted = new ArrayList();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -39,6 +39,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
@InterceptorDef (scope=org.jboss.aop.advice.Scope.PER_VM)
@Bind (pointcut="all(org.jboss.test.aop.jdk15annotated.IntroducedAnnotationPOJO)")
public class IntroducedAnnotationInterceptor implements Interceptor
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/AnnotatedDeclareTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/AnnotatedDeclareTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/AnnotatedDeclareTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -35,6 +35,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class AnnotatedDeclareTestCase extends AOPTestWithSetup
{
SystemOutDecorator out = null;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/SystemOutDecorator.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/SystemOutDecorator.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15annotateddeclare/SystemOutDecorator.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class SystemOutDecorator extends PrintStream
{
static PrintStream sysout = null;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -94,7 +94,7 @@
AnnotatedPOJO pojo = new AnnotatedPOJO();
if (!SimpleInterceptor.intercepted) throw new RuntimeException("failed to intercept tagged constructor");
- complex c = (complex)AnnotationElement.getVisibleAnnotation(AnnotatedPOJO.class, complex.class);
+ complex c = AnnotationElement.getVisibleAnnotation(AnnotatedPOJO.class, complex.class);
printComplex(c);
SimpleInterceptor.intercepted = false;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/complex.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/complex.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/complex.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
@Retention(RetentionPolicy.RUNTIME)
public @interface complex
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/traceable.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/traceable.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/jdk15base/traceable.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -21,10 +21,14 @@
*/
package org.jboss.test.aop.jdk15base;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at Retention(RetentionPolicy.RUNTIME)
public @interface traceable
{
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -49,6 +49,7 @@
* @author <a href="clebert.suconic at jboss.com">Clebert Suconic</a>
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class MemoryLeakTestCase extends TestCase
{
String jbossAopPath;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/memoryleaks/MemoryLeakTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -42,6 +42,7 @@
*
* @author <a href="clebert.suconic at jboss.com">Clebert Suconic</a>
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class MemoryLeakTester extends TestCase
{
@@ -113,7 +114,7 @@
private void undeploy(Class xmlLoader) throws Exception
{
- String strurl = (String)System.getProperty("jboss.aop.path");
+ String strurl = System.getProperty("jboss.aop.path");
assertNotNull("Property jboss.aop.path should be defined",strurl);
strurl = strurl.replace('\\','/');
URL url = new URL("file:/" + strurl);
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/methodhashing/MethodHashingTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/methodhashing/MethodHashingTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/methodhashing/MethodHashingTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -37,6 +37,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class MethodHashingTestCase extends TestCase
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/NotConstructionInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/NotConstructionInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/NotConstructionInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class NotConstructionInterceptor implements Interceptor
{
static boolean intercepted;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/PackageTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/PackageTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/packagedotdot/PackageTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -40,6 +40,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision: 45977 $
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class PackageTestCase extends AOPTestWithSetup
{
public static Test suite()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/pointcut/PointcutTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/pointcut/PointcutTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/pointcut/PointcutTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -40,6 +40,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision: 45977 $
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class PointcutTestCase extends AOPTestWithSetup
{
public static Test suite()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/Interceptions.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/Interceptions.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/Interceptions.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class Interceptions
{
static ArrayList intercepted = new ArrayList();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/PrecedenceTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/PrecedenceTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/precedence/PrecedenceTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked", "cast"})
public class PrecedenceTester extends AOPTestWithSetup
{
//Don't list per_instance aspects for constructor
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AbstractSerializeContainerTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/AbstractSerializeContainerTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AbstractSerializeContainerTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AbstractSerializeContainerTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.ObjectInputStream;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractSerializeContainerTest extends TestCase
+{
+
+ ProxyFileCreator creator;
+ public AbstractSerializeContainerTest(String name, ProxyFileCreator creator)
+ {
+ super(name);
+ this.creator = creator;
+ }
+
+ protected SomeInterface getSerializedProxy() throws Exception
+ {
+ File proxyFile = creator.createProxyFile();
+
+ ObjectInputStream in = new ObjectInputStream(new FileInputStream(proxyFile));
+ Object o = in.readObject();
+ assertNotNull(o);
+ SomeInterface si = (SomeInterface)o;
+ return si;
+ }
+
+
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotatedPOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotatedPOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotatedPOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -42,4 +42,9 @@
{
return x;
}
+
+ public String toString()
+ {
+ return "TEST";
+ }
}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotationImpl.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/AnnotationImpl.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotationImpl.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/AnnotationImpl.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotationImpl implements Annotation
+{
+ public Class<? extends java.lang.annotation.Annotation> annotationType()
+ {
+ return Annotation.class;
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/InProcessProxyFileCreator.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/InProcessProxyFileCreator.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/InProcessProxyFileCreator.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/InProcessProxyFileCreator.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InProcessProxyFileCreator implements ProxyFileCreator
+{
+ ProxyFileCreatorDelegate delegate;
+
+ public InProcessProxyFileCreator(ProxyFileCreatorDelegate delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ public File createProxyFile() throws Exception
+ {
+ File proxyFile;
+ try
+ {
+ proxyFile = AccessController.doPrivileged(new PrivilegedExceptionAction<File>() {
+
+ public File run() throws Exception
+ {
+ return File.createTempFile("proxy", "err");
+ }
+ });
+ }
+ catch (RuntimeException e)
+ {
+ // AutoGenerated
+ throw new RuntimeException(e);
+ }
+
+ proxyFile.deleteOnExit();
+ delegate.createAndSerializeProxy(proxyFile);
+ return proxyFile;
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixin.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherMixin.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixin.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixin.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class OtherMixin implements OtherMixinInterface, OtherMixinInterface2, Serializable
+{
+ private static final long serialVersionUID = 1L;
+ int i;
+ public OtherMixin(int i)
+ {
+ this.i = i;
+ }
+
+ public void other()
+ {
+ }
+
+ public int other2()
+ {
+ return i;
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface OtherMixinInterface
+{
+ void other();
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface2.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface2.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface2.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OtherMixinInterface2.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface OtherMixinInterface2
+{
+ int other2();
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxyFileCreator.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxyFileCreator.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxyFileCreator.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxyFileCreator.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,224 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class OutOfProcessProxyFileCreator implements ProxyFileCreator
+{
+ String proxyCreatorClass;
+
+ public OutOfProcessProxyFileCreator(String proxyCreatorClass)
+ {
+ this.proxyCreatorClass = proxyCreatorClass;
+ }
+
+ public File createProxyFile() throws Exception
+ {
+ return runExternalProcess();
+ }
+
+ private File runExternalProcess() throws Exception
+ {
+ Properties props = System.getProperties();
+
+ String classPath = props.getProperty("java.class.path");
+ String libraryPath = props.getProperty("sun.boot.library.path") + File.separator + "java";
+ String java = findJava(libraryPath);
+
+ File proxyFile = File.createTempFile("proxy", "err");
+ proxyFile.deleteOnExit();
+
+ boolean debugFlag = System.getProperty("jboss.aop.debug.classes", "false").equals("true");
+ String debug = debugFlag ? "-Djboss.aop.debug.classes=true " : "";
+
+ if (classPath.contains(" "))
+ {
+ throw new RuntimeException("Classpath should not contain the space character for this test. " + classPath);
+ }
+
+ String run = java +
+ " -classpath " + classPath + " " +
+ debug +
+ proxyCreatorClass + " " +
+ proxyFile.getAbsolutePath().replace('\\', '/');
+
+ Process proc = Runtime.getRuntime().exec(run);
+
+ int result = proc.waitFor();
+
+ InputStream sysout = proc.getInputStream();
+ InputStream syserr = proc.getErrorStream();
+
+ outputStream("System.out", sysout);
+ outputStream("System.err", syserr);
+
+ switch (result)
+ {
+ case ProxyFileCreatorDelegate.FEW_ARGS:
+ throw new RuntimeException("Too few args passed in");
+ case ProxyFileCreatorDelegate.MANY_ARGS:
+ throw new RuntimeException("Too many args passed in");
+ case ProxyFileCreatorDelegate.NO_SUCH_FILE:
+ throw new RuntimeException("No file found " + proxyFile);
+ case ProxyFileCreatorDelegate.GENERAL_ERROR:
+ String externalException = getExternalException(proxyFile);
+ throw new RuntimeException(externalException);
+ }
+
+ return proxyFile;
+ }
+
+ private void outputStream(String type, InputStream in) throws IOException
+ {
+ System.out.println("= = = = = = = = = = Other process " + type);
+ int i = in.read();
+ while(i != -1)
+ {
+ System.out.print((char)i);
+ i = in.read();
+ }
+ System.out.println("= = = = = = = = = = END Other process " + type);
+ }
+
+ private String getExternalException(File proxyFile)
+ {
+ Reader reader = null;
+ StringBuffer sb = new StringBuffer();
+ try
+ {
+ reader = new FileReader(proxyFile);
+ int r = reader.read();
+ while (r != -1)
+ {
+ sb.append((char)r);
+ r = reader.read();
+ }
+ }
+ catch(Exception e)
+ {
+ }
+ finally
+ {
+ try
+ {
+ reader.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ return sb.toString();
+ }
+
+ private String findJava(String classPath)
+ {
+ String java = null;
+ StringTokenizer tok = new StringTokenizer(classPath, File.pathSeparator);
+ while (tok.hasMoreTokens())
+ {
+ String path = tok.nextToken();
+ if (path.endsWith(".jar"))
+ {
+ continue;
+ }
+ java = getJavaPath(path);
+ if (java != null)
+ {
+ return java;
+ }
+ }
+ return null;
+ }
+
+ private String getJavaPath(String dirName)
+ {
+ if (File.separatorChar == '/')
+ {
+ //Probably on Linux
+ if (dirName.contains("jre"))
+ {
+ dirName = dirName.substring(0, dirName.indexOf(File.separatorChar + "jre"));
+ }
+ String file = getFile(dirName + File.separator + "bin" + File.separator + "java");
+ if (file != null)
+ {
+ return file;
+ }
+ file = getFile(dirName);
+ if (file != null)
+ {
+ return file;
+ }
+ }
+ else if (File.separatorChar == '\\')
+ {
+ //We're probably on windows
+ String file = getFile(dirName + File.separator + "java.exe");
+ if (file != null)
+ {
+ return file;
+ }
+ file = getFile(dirName);
+ if (file != null)
+ {
+ return file;
+ }
+ file = getFile(dirName + ".exe");
+ if (file != null)
+ {
+ return file;
+ }
+ }
+ else
+ {
+ throw new RuntimeException("Cannot figure out OS");
+ }
+ return null;
+ }
+
+ private String getFile(String java)
+ {
+ if (java != null)
+ {
+ File file = new File(java);
+
+ if (file.exists() && !file.isDirectory())
+ {
+ System.out.println("Using Java executable: " + java);
+ return file.getAbsolutePath();
+ }
+ }
+ return null;
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxySerializer.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxySerializer.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/OutOfProcessProxySerializer.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,191 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.aop.proxy;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintStream;
-
-import junit.framework.Assert;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.AdviceBinding;
-import org.jboss.aop.advice.AdviceFactory;
-import org.jboss.aop.advice.AspectDefinition;
-import org.jboss.aop.advice.GenericAspectFactory;
-import org.jboss.aop.advice.InterceptorFactory;
-import org.jboss.aop.advice.Scope;
-import org.jboss.aop.pointcut.PointcutExpression;
-import org.jboss.aop.proxy.container.AOPProxyFactory;
-import org.jboss.aop.proxy.container.AOPProxyFactoryParameters;
-import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class OutOfProcessProxySerializer extends Assert
-{
- final static int WRONG_ARGS = 1;
- final static int NO_SUCH_FILE = 2;
- final static int GENERAL_ERROR = 3;
-
- public static void main (String[] args)
- {
- if (args.length != 1)
- {
- System.exit(WRONG_ARGS);
- }
-
- File file = new File(args[0]);
- if (!file.exists())
- {
- System.exit(NO_SUCH_FILE);
- }
-
- try
- {
-
-// InstanceDomain domain = new InstanceDomain(AspectManager.instance(), "blah", false);
-//
-//
-// InterfaceIntroduction intro = new InterfaceIntroduction("intro", "*", null);
-// String[] intfs = {MixinInterface.class.getName()};
-// InterfaceIntroduction.Mixin mixin = new InterfaceIntroduction.Mixin(Mixin.class.getName(), intfs, null, false);
-// intro.getMixins().add(mixin);
-// domain.addInterfaceIntroduction(intro);
-//
-//
-// AspectDefinition def = new AspectDefinition("aspect", Scope.PER_VM, new GenericAspectFactory(EchoInterceptor.class.getName(), null));
-// domain.addAspectDefinition(def);
-// AdviceFactory advice = new AdviceFactory(def, "invoke");
-// domain.addInterceptorFactory(advice.getName(), advice);
-// {
-// PointcutExpression pointcut = new PointcutExpression("pointcut", "execution(java.lang.String " + POJO.class.getName() + "->helloWorld(..))");
-// domain.addPointcut(pointcut);
-// InterceptorFactory[] interceptors = {advice};
-// AdviceBinding binding = new AdviceBinding("pojo-binding", pointcut, null, null, interceptors);
-// domain.addBinding(binding);
-// }
-//
-// {
-// PointcutExpression pointcut = new PointcutExpression("mixin-pointcut", "execution(java.lang.String $instanceof{" + MixinInterface.class.getName() + "}->intercepted(..))");
-// domain.addPointcut(pointcut);
-// InterceptorFactory[] interceptors = {advice};
-// AdviceBinding binding = new AdviceBinding("mixin-binding", pointcut, null, null, interceptors);
-// domain.addBinding(binding);
-// }
-//
-//
-// AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
-// AOPProxyFactory factory = new GeneratedAOPProxyFactory();
-// params.set
-// factory.createAdvisedProxy(params);
-//
-// Class proxyClass = ContainerProxyFactory.getProxyClass(POJO.class, domain);
-// ClassProxyContainer container = new ClassProxyContainer("test", domain);
-// domain.setAdvisor(container);
-// container.setClass(proxyClass);
-// container.initializeClassContainer();
-// POJO proxy = (POJO) proxyClass.newInstance();
-// AspectManaged cp = (AspectManaged)proxy;
-// cp.setAdvisor(container);
-// Delegate delegate = (Delegate)cp;
-// delegate.setDelegate(new POJO());
-//
-// MixinInterface mi = (MixinInterface) proxy;
-// System.out.println("--- mixin");
-// assertEquals(mi.hello("mixin"), "mixin");
-// System.out.println("--- hw");
-// assertEquals("echoed", proxy.helloWorld());
-// System.out.println("--- icptd");
-// assertEquals("echoed", mi.intercepted("error"));
-//
-
- AspectManager manager = AspectManager.instance();
-// AspectDefinition def = new AspectDefinition("perinstanceaspect", Scope.PER_INSTANCE, new GenericAspectFactory(TestInterceptor.class.getName(), null));
- AspectDefinition def = new AspectDefinition("perinstanceaspect", Scope.PER_VM, new GenericAspectFactory(TestInterceptor.class.getName(), null));
- AdviceFactory advice = new AdviceFactory(def, "invoke");
- PointcutExpression pointcut = new PointcutExpression("perinstancepointcut", "execution(* $instanceof{" + SomeInterface.class.getName() + "}->*(..))");
- InterceptorFactory[] interceptors = {advice};
- AdviceBinding binding = new AdviceBinding("perinstancebinding", pointcut, null, null, interceptors);
-
- manager.addAspectDefinition(def);
- manager.addInterceptorFactory(advice.getName(), advice);
- manager.addPointcut(pointcut);
- manager.addBinding(binding);
-
- AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
- params.setInterfaces(new Class[] {SomeInterface.class});
- params.setTarget(new SerializablePOJO());
-
- AOPProxyFactory factory = new GeneratedAOPProxyFactory();
- SomeInterface si = (SomeInterface)factory.createAdvisedProxy(params);
-
- si.helloWorld();
-
- assertTrue(TestInterceptor.invoked);
-
- ObjectOutputStream out = null;
- try
- {
- out = new ObjectOutputStream(new FileOutputStream(file));
- out.writeObject(si);
- }
- finally
- {
- try
- {
- out.close();
- }
- catch(Exception e)
- {
- }
- }
- }
- catch (Throwable t)
- {
- PrintStream out = null;
- try
- {
- out = new PrintStream(new FileOutputStream(file));
- t.printStackTrace(out);
- }
- catch(Exception e)
- {
- }
- finally
- {
- try
- {
- out.close();
- }
- catch(Exception e)
- {
- }
- }
- System.exit(GENERAL_ERROR);
- }
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreator.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreator.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreator.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreator.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ProxyFileCreator
+{
+ File createProxyFile() throws Exception;
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreatorDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreatorDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreatorDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyFileCreatorDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,120 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.AdviceBinding;
+import org.jboss.aop.advice.AdviceFactory;
+import org.jboss.aop.advice.AspectDefinition;
+import org.jboss.aop.advice.GenericAspectFactory;
+import org.jboss.aop.advice.InterceptorFactory;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.advice.ScopedInterceptorFactory;
+import org.jboss.aop.pointcut.PointcutExpression;
+import org.jboss.aop.pointcut.ast.ParseException;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class ProxyFileCreatorDelegate extends junit.framework.Assert
+{
+ public static final int FEW_ARGS = 1;
+ public static final int MANY_ARGS = 2;
+ public static final int NO_SUCH_FILE = 3;
+ public static final int GENERAL_ERROR = 4;
+
+ protected void createAndSerializeProxy(String[] args)
+ {
+ if (args.length == 0)
+ {
+ System.exit(FEW_ARGS);
+ }
+ else if (args.length > 1)
+ {
+ System.exit(MANY_ARGS);
+ }
+
+ File file = new File(args[0]);
+ if (!file.exists())
+ {
+ System.exit(NO_SUCH_FILE);
+ }
+
+ try
+ {
+ createAndSerializeProxy(file);
+ }
+ catch (Throwable t)
+ {
+ PrintStream out = null;
+ try
+ {
+ out = new PrintStream(new FileOutputStream(file));
+ t.printStackTrace(out);
+ }
+ catch(Exception e)
+ {
+ }
+ finally
+ {
+ try
+ {
+ out.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ System.exit(GENERAL_ERROR);
+ }
+ }
+
+
+
+ public abstract void createAndSerializeProxy(File file) throws Exception;
+
+ protected void addInterceptorBinding(AspectManager manager, int index, Scope scope, String aspectClass, String pointcut) throws ParseException
+ {
+ addAspectBinding(manager, index, scope, aspectClass, null, pointcut);
+ }
+
+ protected void addAspectBinding(AspectManager manager, int index, Scope scope, String aspectClass, String adviceName, String pointcut) throws ParseException
+ {
+ AspectDefinition def = new AspectDefinition("aspect" + index, scope, new GenericAspectFactory(aspectClass, null));
+
+ InterceptorFactory advice = (adviceName != null) ? new AdviceFactory(def, "advice") : new ScopedInterceptorFactory(def);
+ PointcutExpression pc = new PointcutExpression("pc2" + index, pointcut);
+ InterceptorFactory[] interceptors = {advice};
+ AdviceBinding binding = new AdviceBinding("binding" + index, pc, null, null, interceptors);
+
+ manager.addAspectDefinition(def);
+ manager.addInterceptorFactory(advice.getName(), advice);
+ manager.addPointcut(pc);
+ manager.addBinding(binding);
+ }
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -82,10 +82,10 @@
public void testProxy() throws Exception
{
- Class[] mixIntfs = {MixinInterface.class};
+ Class<?>[] mixIntfs = {MixinInterface.class};
ProxyMixin mixin = new ProxyMixin(new Mixin(), mixIntfs);
ProxyMixin[] mixins = {mixin};
- Class[] intfs = {SomeInterface.class};
+ Class<?>[] intfs = {SomeInterface.class};
ClassInstanceAdvisor advisor = new ClassInstanceAdvisor();
advisor.insertInterceptor(new EchoInterceptor());
@@ -116,7 +116,7 @@
public void testClassProxy() throws Exception
{
- Class[] mixIntfs = {MixinInterface.class};
+ Class<?>[] mixIntfs = {MixinInterface.class};
ProxyMixin mixin = new ProxyMixin(new Mixin(), mixIntfs);
ProxyMixin[] mixins = {mixin};
ClassInstanceAdvisor advisor = new ClassInstanceAdvisor();
@@ -205,7 +205,7 @@
domain.addBinding(binding);
}
- Class proxyClass = ContainerProxyFactory.getProxyClass(POJO.class, domain);
+ Class<?> proxyClass = ContainerProxyFactory.getProxyClass(POJO.class, domain);
ClassProxyContainer container = new ClassProxyContainer("test", domain);
domain.setAdvisor(container);
container.setClass(proxyClass);
@@ -241,7 +241,7 @@
domain.addBinding(binding);
}
- Class proxyClass = ContainerProxyFactory.getProxyClass(POJOWithFinalMethods.class, domain);
+ Class<?> proxyClass = ContainerProxyFactory.getProxyClass(POJOWithFinalMethods.class, domain);
ClassProxyContainer container = new ClassProxyContainer("test", domain);
domain.setAdvisor(container);
container.setClass(proxyClass);
@@ -363,6 +363,7 @@
}
}
+ @SuppressWarnings("unchecked")
public void testAnnotationsExistInProxy() throws Exception
{
//THis test fails if we run with jboss retro
@@ -391,9 +392,9 @@
checkExpectedAnnotations(proxyClass);
}
- private void checkExpectedAnnotations(Class clazz) throws Exception
+ private void checkExpectedAnnotations(Class<?> clazz) throws Exception
{
- Annotation ann = (Annotation)clazz.getAnnotation(Annotation.class);
+ Annotation ann = clazz.getAnnotation(Annotation.class);
assertNotNull(ann);
Method getter = clazz.getMethod("getX");
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithAspectsDelegate extends SerializeContainerProxyWithAspectsDelegate
+{
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithAspectsInVmTestCase extends ReSerializeContainerProxyWithAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithAspectsInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithAspectsInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithAspectsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithAspectsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithAspectsOutOfVmTestCase extends ReSerializeContainerProxyWithAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithAspectsOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithAspectsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithAspectsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithAspectsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithAspectsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import java.rmi.MarshalledObject;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithAspectsTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithAspectsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testReserializeProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ MarshalledObject mo = new MarshalledObject(si);
+ Object o = mo.get();
+ assertNotNull(o);
+ SomeInterface rsi = (SomeInterface)o;
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ rsi.helloWorld();
+ assertTrue(TestAspect.invoked);
+ assertFalse(TestAspect2.invoked);
+
+ OtherMixinInterface omi = (OtherMixinInterface)rsi;
+ omi.other();
+
+ OtherMixinInterface2 omi2 = (OtherMixinInterface2)rsi;
+ int i = omi2.other2();
+ assertEquals(20, i);
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ si.otherWorld();
+ assertFalse(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithInterceptorsDelegate extends SerializeContainerProxyWithInterceptorsDelegate
+{
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithInterceptorsInVmTestCase extends ReSerializeContainerProxyWithInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithInterceptorsInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithInterceptorsInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithInterceptorsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithInterceptorsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase extends ReSerializeContainerProxyWithInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithInterceptorsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithInterceptorsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithInterceptorsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import java.rmi.MarshalledObject;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithInterceptorsTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithInterceptorsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testReserializeProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ MarshalledObject mo = new MarshalledObject(si);
+ Object o = mo.get();
+ assertNotNull(o);
+ SomeInterface rsi = (SomeInterface)o;
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ rsi.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertFalse(TestInterceptor2.invoked);
+
+ OtherMixinInterface omi = (OtherMixinInterface)si;
+ omi.other();
+
+ OtherMixinInterface2 omi2 = (OtherMixinInterface2)si;
+ int i = omi2.other2();
+ assertEquals(20, i);
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ rsi.otherWorld();
+ assertFalse(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate extends SerializeContainerProxyWithNonInitialisedAdvicesDelegate
+{
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase extends ReSerializeContainerProxyWithNonInitialisedAdvicesTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase extends ReSerializeContainerProxyWithNonInitialisedAdvicesTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithNonInitialisedAdvicesDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithNonInitialisedAdvicesTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import java.rmi.MarshalledObject;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithNonInitialisedAdvicesTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithNonInitialisedAdvicesTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testReserializeProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ MarshalledObject mo = new MarshalledObject(si);
+ Object o = mo.get();
+ assertNotNull(o);
+ SomeInterface rsi = (SomeInterface)o;
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ TestInterceptor3.invoked = false;
+ TestInterceptor4.invoked = false;
+ TestInterceptor5.invoked = false;
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ TestAspect3.invoked = false;
+ TestAspect4.invoked = false;
+ TestAspect5.invoked = false;
+ rsi.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ assertTrue(TestInterceptor3.invoked);
+ assertTrue(TestInterceptor4.invoked);
+ assertTrue(TestInterceptor5.invoked);
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ assertTrue(TestAspect3.invoked);
+ assertTrue(TestAspect4.invoked);
+ assertTrue(TestAspect5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithScopedAspectsDelegate extends SerializeContainerProxyWithScopedAspectsDelegate
+{
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedAspectsInVmTestCase extends ReSerializeContainerProxyWithScopedAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedAspectsInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedAspectsInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedAspectsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithScopedAspectsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase extends ReSerializeContainerProxyWithScopedAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedAspectsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithScopedAspectsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedAspectsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import java.rmi.MarshalledObject;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithScopedAspectsTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithScopedAspectsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testReserializeProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ MarshalledObject mo = new MarshalledObject(si);
+ Object o = mo.get();
+ assertNotNull(o);
+ SomeInterface rsi = (SomeInterface)o;
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ TestAspect3.invoked = false;
+ TestAspect4.invoked = false;
+ TestAspect5.invoked = false;
+ rsi.helloWorld();
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ assertTrue(TestAspect3.invoked);
+ assertTrue(TestAspect4.invoked);
+ assertTrue(TestAspect5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithScopedInterceptorsDelegate extends SerializeContainerProxyWithScopedInterceptorsDelegate
+{
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase extends ReSerializeContainerProxyWithScopedInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedInterceptorsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithScopedInterceptorsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase extends ReSerializeContainerProxyWithScopedInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithScopedInterceptorsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithScopedInterceptorsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithScopedInterceptorsTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithScopedInterceptorsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ TestInterceptor3.invoked = false;
+ TestInterceptor4.invoked = false;
+ TestInterceptor5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ assertTrue(TestInterceptor3.invoked);
+ assertTrue(TestInterceptor4.invoked);
+ assertTrue(TestInterceptor5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReSerializeContainerProxyWithSimpleMetaDataDelegate extends SerializeContainerProxyWithSimpleMetaDataDelegate
+{
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase extends ReSerializeContainerProxyWithSimpleMetaDataTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithSimpleMetaDataInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new ReSerializeContainerProxyWithSimpleMetaDataDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase extends SerializeContainerProxyWithSimpleMetaDataTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase");
+ suite.addTestSuite(ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public ReSerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(ReSerializeContainerProxyWithSimpleMetaDataDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/ReSerializeContainerProxyWithSimpleMetaDataTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class ReSerializeContainerProxyWithSimpleMetaDataTest extends AbstractSerializeContainerTest
+{
+ public ReSerializeContainerProxyWithSimpleMetaDataTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ SimpleMetaDataInterceptor.data = null;
+ si.helloWorld();
+ assertNotNull(SimpleMetaDataInterceptor.data);
+ assertEquals("metadata", SimpleMetaDataInterceptor.data);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializablePOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializablePOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializablePOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,8 +30,15 @@
*/
public class SerializablePOJO implements Serializable
{
+ private static final long serialVersionUID = 1L;
+
public String helloWorld()
{
return "error";
}
+
+ public String otherWorld()
+ {
+ return "otherWorld";
+ }
}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyCacheKeyTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyCacheKeyTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyCacheKeyTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyCacheKeyTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,181 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Externalizable;
+import java.rmi.MarshalledObject;
+import java.util.ArrayList;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.aop.proxy.container.AOPProxyFactoryMixin;
+import org.jboss.aop.proxy.container.ContainerProxyCacheKey;
+import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
+import org.jboss.metadata.plugins.repository.basic.BasicMetaDataRepository;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.metadata.spi.MutableMetaData;
+import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
+import org.jboss.metadata.spi.scope.CommonLevels;
+import org.jboss.metadata.spi.scope.Scope;
+import org.jboss.metadata.spi.scope.ScopeKey;
+import org.jboss.test.aop.AOPTestWithSetup;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SerializeContainerProxyCacheKeyTestCase extends AOPTestWithSetup
+{
+
+ public SerializeContainerProxyCacheKeyTestCase(String arg0)
+ {
+ // FIXME SerialixzeContainerProxyCacheKeyTestCase constructor
+ super(arg0);
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyCacheKeyTestCase");
+ suite.addTestSuite(SerializeContainerProxyCacheKeyTestCase.class);
+ return suite;
+ }
+
+
+ public void testSerializeKeyNoMetaData() throws Exception
+ {
+ ContainerProxyCacheKey original1 = new ContainerProxyCacheKey(
+ "/",
+ SerializeContainerProxyCacheKeyTestCase.class,
+ new Class[] {Externalizable.class, SomeInterface.class},
+ getMixins(),
+ null);
+
+ ContainerProxyCacheKey original2 = new ContainerProxyCacheKey(
+ "/",
+ SerializeContainerProxyCacheKeyTestCase.class,
+ new Class[] {Externalizable.class},
+ getMixins(),
+ null);
+
+ assertFalse(original1.equals(original2));
+
+ MarshalledObject mo1 = new MarshalledObject(original1);
+ MarshalledObject mo2 = new MarshalledObject(original2);
+
+ ContainerProxyCacheKey deserialized1 = (ContainerProxyCacheKey)mo1.get();
+ ContainerProxyCacheKey deserialized2 = (ContainerProxyCacheKey)mo2.get();
+
+ assertEquals(original1, deserialized1);
+ assertEquals(deserialized1, original1);
+ assertEquals(original2, deserialized2);
+ assertEquals(deserialized2, original2);
+ assertFalse(deserialized1.equals(deserialized2));
+ }
+
+ public void testEqualsMetaDataNotSerialized()
+ {
+ MetaData md = getMetaData("A", "testEqualsMetaDataNotSerialized");
+
+ ContainerProxyCacheKey original1 = new ContainerProxyCacheKey(
+ "/",
+ SerializeContainerProxyCacheKeyTestCase.class,
+ new Class[] {Externalizable.class, SomeInterface.class},
+ getMixins(),
+ md);
+
+ ContainerProxyCacheKey original2 = new ContainerProxyCacheKey(
+ "/",
+ SerializeContainerProxyCacheKeyTestCase.class,
+ new Class[] {Externalizable.class, SomeInterface.class},
+ getMixins(),
+ md);
+
+ assertEquals(original1, original2);
+ assertEquals(original2, original1);
+
+ ContainerProxyCacheKey original3 = new ContainerProxyCacheKey(
+ "/",
+ SerializeContainerProxyCacheKeyTestCase.class,
+ new Class[] {Externalizable.class, SomeInterface.class},
+ getMixins(),
+ null);
+
+ assertFalse(original1.equals(original3));
+
+ MetaData md2 = getMetaData("A", "testEqualsMetaDataNotSerialized2");
+ ContainerProxyCacheKey original4 = new ContainerProxyCacheKey(
+ "/",
+ SerializeContainerProxyCacheKeyTestCase.class,
+ new Class[] {Externalizable.class, SomeInterface.class},
+ getMixins(),
+ md2);
+
+ assertFalse(original1.equals(original4));
+ }
+
+ public void testSerializeKeyWithMetaData() throws Exception
+ {
+ MetaData md = getMetaData("A", "testSerializeKeyWithMetaData");
+ ContainerProxyCacheKey original1 = new ContainerProxyCacheKey(
+ "/",
+ SerializeContainerProxyCacheKeyTestCase.class,
+ new Class[] {Externalizable.class, SomeInterface.class},
+ getMixins(),
+ md);
+
+ MarshalledObject mo1 = new MarshalledObject(original1);
+
+ ContainerProxyCacheKey deserialized1 = (ContainerProxyCacheKey)mo1.get();
+
+ assertEquals(original1, deserialized1);
+ assertEquals(deserialized1, original1);
+ }
+
+ private MetaData getMetaData(String app, String instance)
+ {
+ MutableMetaDataRepository repository = new BasicMetaDataRepository();
+ ArrayList<Scope> scopes = new ArrayList<Scope>();
+ scopes.add(new Scope(CommonLevels.APPLICATION, app));
+ scopes.add(new Scope(CommonLevels.INSTANCE, instance));
+ ScopeKey scopeKey = new ScopeKey(scopes);
+
+ MemoryMetaDataLoader loader = new MemoryMetaDataLoader(scopeKey);
+ repository.addMetaDataRetrieval(loader);
+
+ ((MutableMetaData)loader).addAnnotation(new AnnotationImpl());
+
+ MetaData md = repository.getMetaData(scopeKey);
+
+ return md;
+ }
+
+ private AOPProxyFactoryMixin[] getMixins()
+ {
+ AOPProxyFactoryMixin[] mixins = new AOPProxyFactoryMixin[2];
+ mixins[0] = new AOPProxyFactoryMixin(Mixin.class, new Class[] {MixinInterface.class}, "abc");
+ mixins[1] = new AOPProxyFactoryMixin(OtherMixin.class, new Class[] {OtherMixinInterface.class});
+ return mixins;
+ }
+
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,226 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.proxy;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-/**
- * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision: 64431 $
- */
-public class SerializeContainerProxyTestCase extends TestCase
-{
-
- public static void main(String[] args)
- {
- TestRunner.run(suite());
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite("SerializeContainerProxyTestCase");
- suite.addTestSuite(SerializeContainerProxyTestCase.class);
- return suite;
- }
-
- public SerializeContainerProxyTestCase(String name)
- {
- super(name);
- }
-
- public void testContainerProxy() throws Exception
- {
- try
- {
- File proxyFile = runExternalProcess();
-
- ObjectInputStream in = new ObjectInputStream(new FileInputStream(proxyFile));
- SomeInterface si = (SomeInterface)in.readObject();
-
- si.helloWorld();
- assertTrue(TestInterceptor.invoked);
- }
- catch(Exception e)
- {
- e.printStackTrace();
- throw e;
- }
- }
-
- private File runExternalProcess() throws Exception
- {
- Properties props = System.getProperties();
-
- String classPath = props.getProperty("java.class.path");
- String libraryPath = props.getProperty("sun.boot.library.path") + File.separator + "java";
- String java = findJava(libraryPath);
-
- File proxyFile = File.createTempFile("proxy", "err");
- proxyFile.deleteOnExit();
-
-// System.out.println(classPath);
- boolean debugFlag = System.getProperty("jboss.aop.debug.classes", "false").equals("true");
- String debug = debugFlag ? "-Djboss.aop.debug.classes=true " : "";
-
- Process proc = Runtime.getRuntime().exec(
- java +
- " -classpath " + classPath + " " +
- debug +
- OutOfProcessProxySerializer.class.getName() + " " +
- proxyFile.getAbsolutePath());
- int result = proc.waitFor();
-
- switch (result)
- {
- case OutOfProcessProxySerializer.WRONG_ARGS:
- throw new RuntimeException("Wrong number of args passed in");
- case OutOfProcessProxySerializer.NO_SUCH_FILE:
- throw new RuntimeException("No file found " + proxyFile);
- case OutOfProcessProxySerializer.GENERAL_ERROR:
- String externalException = getExternalException(proxyFile);
- throw new RuntimeException(externalException);
- }
-
- return proxyFile;
- }
-
- private String getExternalException(File proxyFile)
- {
- Reader reader = null;
- StringBuffer sb = new StringBuffer();
- try
- {
- reader = new FileReader(proxyFile);
- int r = reader.read();
- while (r != -1)
- {
- sb.append((char)r);
- r = reader.read();
- }
- }
- catch(Exception e)
- {
- }
- finally
- {
- try
- {
- reader.close();
- }
- catch(Exception e)
- {
- }
- }
- return sb.toString();
- }
-
- private String findJava(String classPath)
- {
- String java = null;
- StringTokenizer tok = new StringTokenizer(classPath, File.pathSeparator);
- while (tok.hasMoreTokens())
- {
- String path = tok.nextToken();
- if (path.endsWith(".jar"))
- {
- continue;
- }
- java = getJavaPath(path);
- if (java != null)
- {
- return java;
- }
- }
- return null;
- }
-
- private String getJavaPath(String dirName)
- {
- if (File.separatorChar == '/')
- {
- //Probably on Linuxx
- //AFAIK on linux we have no extension after java in the bin directory?
- String file = getFile(dirName + File.separator + "java");
- if (file != null)
- {
- return file;
- }
- file = getFile(dirName);
- if (file != null)
- {
- return file;
- }
- }
- else if (File.separatorChar == '\\')
- {
- //We're probably on windows
- String file = getFile(dirName + File.separator + "java.exe");
- if (file != null)
- {
- return file;
- }
- file = getFile(dirName);
- if (file != null)
- {
- return file;
- }
- file = getFile(dirName + ".exe");
- if (file != null)
- {
- return file;
- }
- }
- else
- {
- throw new RuntimeException("Cannot figure out OS");
- }
- return null;
- }
-
- private String getFile(String java)
- {
- if (java != null)
- {
- File file = new File(java);
-
- if (file.exists() && !file.isDirectory())
- {
- System.out.println("Using Java executable: " + java);
- return file.getAbsolutePath();
- }
- }
- return null;
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,105 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.proxy.container.AOPProxyFactory;
+import org.jboss.aop.proxy.container.AOPProxyFactoryMixin;
+import org.jboss.aop.proxy.container.AOPProxyFactoryParameters;
+import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SerializeContainerProxyWithAspectsDelegate extends ProxyFileCreatorDelegate
+{
+ public static void main (String[] args)
+ {
+ SerializeContainerProxyWithAspectsDelegate delegate = new SerializeContainerProxyWithAspectsDelegate();
+ delegate.createAndSerializeProxy(args);
+ }
+
+ public void createAndSerializeProxy(File file) throws Exception
+ {
+ AspectManager manager = AspectManager.instance();
+ addAspectBinding(manager,
+ 1,
+ Scope.PER_VM,
+ TestAspect.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+
+ addAspectBinding(manager,
+ 2,
+ Scope.PER_VM,
+ TestAspect2.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->otherWorld(..))");
+
+ AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
+ params.setInterfaces(new Class[] {SomeInterface.class});
+ params.setMixins(new AOPProxyFactoryMixin[] {
+ new AOPProxyFactoryMixin(OtherMixin.class, new Class[] {OtherMixinInterface.class, OtherMixinInterface2.class}, "20")
+ });
+
+ params.setTarget(new SerializablePOJO());
+ AOPProxyFactory factory = new GeneratedAOPProxyFactory();
+ SomeInterface si = (SomeInterface)factory.createAdvisedProxy(params);
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ si.helloWorld();
+ assertTrue(TestAspect.invoked);
+ assertFalse(TestAspect2.invoked);
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ si.otherWorld();
+ assertFalse(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+
+ ObjectOutputStream out = null;
+ try
+ {
+ out = new ObjectOutputStream(new FileOutputStream(file));
+ out.writeObject(si);
+ }
+ finally
+ {
+ try
+ {
+ out.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithAspectsInVmTestCase extends SerializeContainerProxyWithAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithAspectsInVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithAspectsInVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithAspectsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new SerializeContainerProxyWithAspectsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithAspectsOutOfVmTestCase extends SerializeContainerProxyWithAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithAspectsOutOfVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithAspectsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithAspectsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(SerializeContainerProxyWithAspectsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithAspectsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class SerializeContainerProxyWithAspectsTest extends AbstractSerializeContainerTest
+{
+ public SerializeContainerProxyWithAspectsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ si.helloWorld();
+ assertTrue(TestAspect.invoked);
+ assertFalse(TestAspect2.invoked);
+
+ OtherMixinInterface omi = (OtherMixinInterface)si;
+ omi.other();
+
+ OtherMixinInterface2 omi2 = (OtherMixinInterface2)si;
+ int i = omi2.other2();
+ assertEquals(20, i);
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ si.otherWorld();
+ assertFalse(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.proxy.container.AOPProxyFactory;
+import org.jboss.aop.proxy.container.AOPProxyFactoryMixin;
+import org.jboss.aop.proxy.container.AOPProxyFactoryParameters;
+import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SerializeContainerProxyWithInterceptorsDelegate extends ProxyFileCreatorDelegate
+{
+ public static void main (String[] args)
+ {
+ SerializeContainerProxyWithInterceptorsDelegate serializer = new SerializeContainerProxyWithInterceptorsDelegate();
+ serializer.createAndSerializeProxy(args);
+ }
+
+ public void createAndSerializeProxy(File file) throws Exception
+ {
+ AspectManager manager = AspectManager.instance();
+ addInterceptorBinding(manager,
+ 1,
+ Scope.PER_VM,
+ TestInterceptor.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+
+ addInterceptorBinding(manager,
+ 2,
+ Scope.PER_VM,
+ TestInterceptor2.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->otherWorld(..))");
+
+ AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
+ params.setInterfaces(new Class[] {SomeInterface.class});
+ params.setMixins(new AOPProxyFactoryMixin[] {
+ new AOPProxyFactoryMixin(OtherMixin.class, new Class[] {OtherMixinInterface.class, OtherMixinInterface2.class}, "20")
+ });
+
+ params.setTarget(new SerializablePOJO());
+ AOPProxyFactory factory = new GeneratedAOPProxyFactory();
+ SomeInterface si = (SomeInterface)factory.createAdvisedProxy(params);
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertFalse(TestInterceptor2.invoked);
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ si.otherWorld();
+ assertFalse(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+
+ ObjectOutputStream out = null;
+ try
+ {
+ out = new ObjectOutputStream(new FileOutputStream(file));
+ out.writeObject(si);
+ }
+ finally
+ {
+ try
+ {
+ out.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithInterceptorsInVmTestCase extends SerializeContainerProxyWithInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithInterceptorsInVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithInterceptorsInVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithInterceptorsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new SerializeContainerProxyWithInterceptorsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithInterceptorsOutOfVmTestCase extends SerializeContainerProxyWithInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithInterceptorsOutOfVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithInterceptorsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithInterceptorsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(SerializeContainerProxyWithInterceptorsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithInterceptorsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class SerializeContainerProxyWithInterceptorsTest extends AbstractSerializeContainerTest
+{
+ public SerializeContainerProxyWithInterceptorsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertFalse(TestInterceptor2.invoked);
+
+ OtherMixinInterface omi = (OtherMixinInterface)si;
+ omi.other();
+
+ OtherMixinInterface2 omi2 = (OtherMixinInterface2)si;
+ int i = omi2.other2();
+ assertEquals(20, i);
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ si.otherWorld();
+ assertFalse(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,147 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.proxy.container.AOPProxyFactory;
+import org.jboss.aop.proxy.container.AOPProxyFactoryMixin;
+import org.jboss.aop.proxy.container.AOPProxyFactoryParameters;
+import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SerializeContainerProxyWithNonInitialisedAdvicesDelegate extends ProxyFileCreatorDelegate
+{
+ public static void main (String[] args)
+ {
+ SerializeContainerProxyWithNonInitialisedAdvicesDelegate delegate = new SerializeContainerProxyWithNonInitialisedAdvicesDelegate();
+ delegate.createAndSerializeProxy(args);
+ }
+
+ public void createAndSerializeProxy(File file) throws Exception
+ {
+ AspectManager manager = AspectManager.instance();
+ addInterceptorBinding(manager,
+ 1,
+ Scope.PER_VM,
+ TestInterceptor.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 2,
+ Scope.PER_CLASS,
+ TestInterceptor2.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 3,
+ Scope.PER_CLASS_JOINPOINT,
+ TestInterceptor3.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 4,
+ Scope.PER_INSTANCE,
+ TestInterceptor4.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 5,
+ Scope.PER_JOINPOINT,
+ TestInterceptor5.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 6,
+ Scope.PER_VM,
+ TestAspect.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 7,
+ Scope.PER_CLASS,
+ TestAspect2.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 8,
+ Scope.PER_CLASS_JOINPOINT,
+ TestAspect3.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 9,
+ Scope.PER_INSTANCE,
+ TestAspect4.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 10,
+ Scope.PER_JOINPOINT,
+ TestAspect5.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
+ params.setInterfaces(new Class[] {SomeInterface.class});
+ params.setMixins(new AOPProxyFactoryMixin[] {
+ new AOPProxyFactoryMixin(OtherMixin.class, new Class[] {OtherMixinInterface.class, OtherMixinInterface2.class}, "20")
+ });
+
+ params.setTarget(new SerializablePOJO());
+ AOPProxyFactory factory = new GeneratedAOPProxyFactory();
+ SomeInterface si = (SomeInterface)factory.createAdvisedProxy(params);
+
+ //DO NOT CALL THE PROXY HERE!!! (The intention of this test is to make sure that the per_instance and per_joinpoint aspects
+ //and interceptors will still work although we have never made a call)
+
+
+ ObjectOutputStream out = null;
+ try
+ {
+ out = new ObjectOutputStream(new FileOutputStream(file));
+ out.writeObject(si);
+ }
+ finally
+ {
+ try
+ {
+ out.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase extends SerializeContainerProxyWithNonInitialisedAdvicesTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithNonInitialisedAdvicesInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new SerializeContainerProxyWithNonInitialisedAdvicesDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase extends SerializeContainerProxyWithNonInitialisedAdvicesTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithNonInitialisedAdvicesOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(SerializeContainerProxyWithNonInitialisedAdvicesDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithNonInitialisedAdvicesTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class SerializeContainerProxyWithNonInitialisedAdvicesTest extends AbstractSerializeContainerTest
+{
+ public SerializeContainerProxyWithNonInitialisedAdvicesTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ TestInterceptor3.invoked = false;
+ TestInterceptor4.invoked = false;
+ TestInterceptor5.invoked = false;
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ TestAspect3.invoked = false;
+ TestAspect4.invoked = false;
+ TestAspect5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ assertTrue(TestInterceptor3.invoked);
+ assertTrue(TestInterceptor4.invoked);
+ assertTrue(TestInterceptor5.invoked);
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ assertTrue(TestAspect3.invoked);
+ assertTrue(TestAspect4.invoked);
+ assertTrue(TestAspect5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,128 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.proxy.container.AOPProxyFactory;
+import org.jboss.aop.proxy.container.AOPProxyFactoryMixin;
+import org.jboss.aop.proxy.container.AOPProxyFactoryParameters;
+import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SerializeContainerProxyWithScopedAspectsDelegate extends ProxyFileCreatorDelegate
+{
+ public static void main (String[] args)
+ {
+ SerializeContainerProxyWithScopedAspectsDelegate delegate = new SerializeContainerProxyWithScopedAspectsDelegate();
+ delegate.createAndSerializeProxy(args);
+ }
+
+ public void createAndSerializeProxy(File file) throws Exception
+ {
+ AspectManager manager = AspectManager.instance();
+ addAspectBinding(manager,
+ 1,
+ Scope.PER_VM,
+ TestAspect.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 2,
+ Scope.PER_CLASS,
+ TestAspect2.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 3,
+ Scope.PER_CLASS_JOINPOINT,
+ TestAspect3.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 4,
+ Scope.PER_INSTANCE,
+ TestAspect4.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addAspectBinding(manager,
+ 5,
+ Scope.PER_JOINPOINT,
+ TestAspect5.class.getName(),
+ "advice",
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+
+
+ AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
+ params.setInterfaces(new Class[] {SomeInterface.class});
+ params.setMixins(new AOPProxyFactoryMixin[] {
+ new AOPProxyFactoryMixin(OtherMixin.class, new Class[] {OtherMixinInterface.class, OtherMixinInterface2.class}, "20")
+ });
+
+ params.setTarget(new SerializablePOJO());
+ AOPProxyFactory factory = new GeneratedAOPProxyFactory();
+ SomeInterface si = (SomeInterface)factory.createAdvisedProxy(params);
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ TestAspect3.invoked = false;
+ TestAspect4.invoked = false;
+ TestAspect5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ assertTrue(TestAspect3.invoked);
+ assertTrue(TestAspect4.invoked);
+ assertTrue(TestAspect5.invoked);
+
+
+ ObjectOutputStream out = null;
+ try
+ {
+ out = new ObjectOutputStream(new FileOutputStream(file));
+ out.writeObject(si);
+ }
+ finally
+ {
+ try
+ {
+ out.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithScopedAspectsInVmTestCase extends SerializeContainerProxyWithScopedAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithScopedAspectsInVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithScopedAspectsInVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithScopedAspectsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new SerializeContainerProxyWithScopedAspectsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithScopedAspectsOutOfVmTestCase extends SerializeContainerProxyWithScopedAspectsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithScopedAspectsOutOfVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithScopedAspectsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithScopedAspectsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(SerializeContainerProxyWithScopedAspectsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedAspectsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class SerializeContainerProxyWithScopedAspectsTest extends AbstractSerializeContainerTest
+{
+ public SerializeContainerProxyWithScopedAspectsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ TestAspect.invoked = false;
+ TestAspect2.invoked = false;
+ TestAspect3.invoked = false;
+ TestAspect4.invoked = false;
+ TestAspect5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestAspect2.invoked);
+ assertTrue(TestAspect3.invoked);
+ assertTrue(TestAspect4.invoked);
+ assertTrue(TestAspect5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,123 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.proxy.container.AOPProxyFactory;
+import org.jboss.aop.proxy.container.AOPProxyFactoryMixin;
+import org.jboss.aop.proxy.container.AOPProxyFactoryParameters;
+import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SerializeContainerProxyWithScopedInterceptorsDelegate extends ProxyFileCreatorDelegate
+{
+ public static void main (String[] args)
+ {
+ SerializeContainerProxyWithScopedInterceptorsDelegate delegate = new SerializeContainerProxyWithScopedInterceptorsDelegate();
+ delegate.createAndSerializeProxy(args);
+ }
+
+ public void createAndSerializeProxy(File file) throws Exception
+ {
+ AspectManager manager = AspectManager.instance();
+ addInterceptorBinding(manager,
+ 1,
+ Scope.PER_VM,
+ TestInterceptor.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 2,
+ Scope.PER_CLASS,
+ TestInterceptor2.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 3,
+ Scope.PER_CLASS_JOINPOINT,
+ TestInterceptor3.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 4,
+ Scope.PER_INSTANCE,
+ TestInterceptor4.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ addInterceptorBinding(manager,
+ 5,
+ Scope.PER_JOINPOINT,
+ TestInterceptor5.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+
+
+ AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
+ params.setInterfaces(new Class[] {SomeInterface.class});
+ params.setMixins(new AOPProxyFactoryMixin[] {
+ new AOPProxyFactoryMixin(OtherMixin.class, new Class[] {OtherMixinInterface.class, OtherMixinInterface2.class}, "20")
+ });
+
+ params.setTarget(new SerializablePOJO());
+ AOPProxyFactory factory = new GeneratedAOPProxyFactory();
+ SomeInterface si = (SomeInterface)factory.createAdvisedProxy(params);
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ TestInterceptor3.invoked = false;
+ TestInterceptor4.invoked = false;
+ TestInterceptor5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ assertTrue(TestInterceptor3.invoked);
+ assertTrue(TestInterceptor4.invoked);
+ assertTrue(TestInterceptor5.invoked);
+
+
+ ObjectOutputStream out = null;
+ try
+ {
+ out = new ObjectOutputStream(new FileOutputStream(file));
+ out.writeObject(si);
+ }
+ finally
+ {
+ try
+ {
+ out.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithScopedInterceptorsInVmTestCase extends SerializeContainerProxyWithScopedInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithScopedInterceptorsInVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithScopedInterceptorsInVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithScopedInterceptorsInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new SerializeContainerProxyWithScopedInterceptorsDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase extends SerializeContainerProxyWithScopedInterceptorsTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithScopedInterceptorsOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(SerializeContainerProxyWithScopedInterceptorsDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithScopedInterceptorsTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class SerializeContainerProxyWithScopedInterceptorsTest extends AbstractSerializeContainerTest
+{
+ public SerializeContainerProxyWithScopedInterceptorsTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ TestInterceptor.invoked = false;
+ TestInterceptor2.invoked = false;
+ TestInterceptor3.invoked = false;
+ TestInterceptor4.invoked = false;
+ TestInterceptor5.invoked = false;
+ si.helloWorld();
+ assertTrue(TestInterceptor.invoked);
+ assertTrue(TestInterceptor2.invoked);
+ assertTrue(TestInterceptor3.invoked);
+ assertTrue(TestInterceptor4.invoked);
+ assertTrue(TestInterceptor5.invoked);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataDelegate.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataDelegate.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataDelegate.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,94 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.metadata.SimpleMetaData;
+import org.jboss.aop.proxy.container.AOPProxyFactory;
+import org.jboss.aop.proxy.container.AOPProxyFactoryMixin;
+import org.jboss.aop.proxy.container.AOPProxyFactoryParameters;
+import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SerializeContainerProxyWithSimpleMetaDataDelegate extends ProxyFileCreatorDelegate
+{
+ public static void main (String[] args)
+ {
+ SerializeContainerProxyWithSimpleMetaDataDelegate delegate = new SerializeContainerProxyWithSimpleMetaDataDelegate();
+ delegate.createAndSerializeProxy(args);
+ }
+
+ public void createAndSerializeProxy(File file) throws Exception
+ {
+ AspectManager manager = AspectManager.instance();
+ addInterceptorBinding(manager,
+ 1,
+ Scope.PER_VM,
+ SimpleMetaDataInterceptor.class.getName(),
+ "execution(* $instanceof{" + SomeInterface.class.getName() + "}->helloWorld(..))");
+
+ AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
+ params.setInterfaces(new Class[] {SomeInterface.class});
+ params.setMixins(new AOPProxyFactoryMixin[] {
+ new AOPProxyFactoryMixin(OtherMixin.class, new Class[] {OtherMixinInterface.class, OtherMixinInterface2.class}, "20")
+ });
+
+ SimpleMetaData data = new SimpleMetaData();
+ data.addMetaData("TEST", "value", "metadata");
+ params.setSimpleMetaData(data);
+
+ params.setTarget(new SerializablePOJO());
+ AOPProxyFactory factory = new GeneratedAOPProxyFactory();
+ SomeInterface si = (SomeInterface)factory.createAdvisedProxy(params);
+
+ SimpleMetaDataInterceptor.data = null;
+ si.helloWorld();
+ assertNotNull(SimpleMetaDataInterceptor.data);
+ assertEquals("metadata", SimpleMetaDataInterceptor.data);
+
+ ObjectOutputStream out = null;
+ try
+ {
+ out = new ObjectOutputStream(new FileOutputStream(file));
+ out.writeObject(si);
+ }
+ finally
+ {
+ try
+ {
+ out.close();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataInVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataInVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataInVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataInVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithSimpleMetaDataInVmTestCase extends SerializeContainerProxyWithSimpleMetaDataTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithSimpleMetaDataInVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithSimpleMetaDataInVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithSimpleMetaDataInVmTestCase(String name)
+ {
+ super(name, new InProcessProxyFileCreator(new SerializeContainerProxyWithSimpleMetaDataDelegate()));
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public class SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase extends SerializeContainerProxyWithSimpleMetaDataTest
+{
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase");
+ suite.addTestSuite(SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase.class);
+ return suite;
+ }
+
+ public SerializeContainerProxyWithSimpleMetaDataOutOfVmTestCase(String name)
+ {
+ super(name, new OutOfProcessProxyFileCreator(SerializeContainerProxyWithSimpleMetaDataDelegate.class.getName()));
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataTest.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataTest.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataTest.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SerializeContainerProxyWithSimpleMetaDataTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.proxy;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 64431 $
+ */
+public abstract class SerializeContainerProxyWithSimpleMetaDataTest extends AbstractSerializeContainerTest
+{
+ public SerializeContainerProxyWithSimpleMetaDataTest(String name, ProxyFileCreator creator)
+ {
+ super(name, creator);
+ }
+
+ public void testContainerProxy() throws Exception
+ {
+ try
+ {
+ SomeInterface si = getSerializedProxy();
+
+ SimpleMetaDataInterceptor.data = null;
+ si.helloWorld();
+ assertNotNull(SimpleMetaDataInterceptor.data);
+ assertEquals("metadata", SimpleMetaDataInterceptor.data);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SimpleMetaDataInterceptor.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SimpleMetaDataInterceptor.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SimpleMetaDataInterceptor.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SimpleMetaDataInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleMetaDataInterceptor implements Interceptor, Serializable
+{
+ private static final long serialVersionUID = 1L;
+ public static String data;
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ data = (String)invocation.getMetaData("TEST", "value");
+ return invocation.invokeNext();
+ }
+
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SomeInterface.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SomeInterface.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/SomeInterface.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,5 +29,7 @@
*/
public interface SomeInterface
{
- public String helloWorld();
+ String helloWorld();
+
+ String otherWorld();
}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestAspect.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspect implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+ public static boolean invoked;
+ public Object advice(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect2.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestAspect2.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect2.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect2.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspect2 implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+ public static boolean invoked;
+ public Object advice(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect3.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestAspect3.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect3.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect3.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspect3 implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+ public static boolean invoked;
+ public Object advice(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect4.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestAspect4.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect4.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect4.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspect4 implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+ public static boolean invoked;
+ public Object advice(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect5.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestAspect5.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect5.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestAspect5.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspect5 implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+ public static boolean invoked;
+ public Object advice(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.aop.proxy;
+import java.io.Serializable;
+
import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;
@@ -29,8 +31,9 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class TestInterceptor implements Interceptor
+public class TestInterceptor implements Interceptor, Serializable
{
+ private static final long serialVersionUID = 1L;
static boolean invoked;
public String getName()
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor2.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor2.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor2.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor2.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptor2 implements Interceptor, Serializable
+{
+ private static final long serialVersionUID = 1L;
+ static boolean invoked;
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public Object invoke(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor3.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor3.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor3.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor3.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptor3 implements Interceptor, Serializable
+{
+ private static final long serialVersionUID = 1L;
+ static boolean invoked;
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public Object invoke(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor4.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor4.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor4.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor4.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptor4 implements Interceptor, Serializable
+{
+ private static final long serialVersionUID = 1L;
+ static boolean invoked;
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public Object invoke(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor5.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor5.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor5.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/proxy/TestInterceptor5.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.aop.proxy;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptor5 implements Interceptor, Serializable
+{
+ private static final long serialVersionUID = 1L;
+ static boolean invoked;
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public Object invoke(Invocation inv) throws Throwable
+ {
+ invoked = true;
+ return inv.invokeNext();
+ }
+}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain)
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.rebuildcallerchain;
-
-/**
- * A Caller1.
- *
- * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public class Caller1
-{
-
- public void execute() throws Exception
- {
-// throw new Exception("This method should not have been called!");
- }
-
- public void foo() {
-
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller1.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.rebuildcallerchain;
+
+/**
+ * A Caller1.
+ *
+ * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class Caller1
+{
+
+ public void execute() throws Exception
+ {
+// throw new Exception("This method should not have been called!");
+ }
+
+ public void foo() {
+
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.rebuildcallerchain;
-
-/**
- * A Caller2.
- *
- * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public class Caller2
-{
-
- public void execute() throws Exception
- {
-// throw new Exception("This method should not have been called!");
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/Caller2.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.rebuildcallerchain;
+
+/**
+ * A Caller2.
+ *
+ * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class Caller2
+{
+
+ public void execute() throws Exception
+ {
+// throw new Exception("This method should not have been called!");
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.rebuildcallerchain;
-
-import org.jboss.aop.joinpoint.Invocation;
-
-import org.jboss.aop.advice.Interceptor;
-
-/**
- * A RebuilCallInterceptor.
- *
- * @author <a href="RebuildCallInterceptorle W. Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public class RebuildCallerChainInterceptor implements Interceptor
-{
- //@Override
- public String getName()
- {
- return this.getClass().getName();
- }
-
- //@Override
- public Object invoke(Invocation invocation) throws Throwable
- {
- try
- {
- System.out.println("Interceptor ignoring call...");
- return null;
- }
- catch(Exception e)
- {
- throw e;
- }
- finally
- {
-
- }
- }
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.rebuildcallerchain;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ * A RebuilCallInterceptor.
+ *
+ * @author <a href="RebuildCallInterceptorle W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RebuildCallerChainInterceptor implements Interceptor
+{
+ //@Override
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ //@Override
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ System.out.println("Interceptor ignoring call...");
+ return null;
+ }
+ catch(Exception e)
+ {
+ throw e;
+ }
+ finally
+ {
+
+ }
+ }
+}
Deleted: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java 2008-03-24 01:24:49 UTC (rev 71182)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.aop.rebuildcallerchain;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.AdviceBinding;
-import org.jboss.test.aop.AOPTestWithSetup;
-
-/**
- * A RebuildCallerChainTestCase.
- *
- * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public class RebuildCallerChainTestCase extends AOPTestWithSetup
-{
-
- public RebuildCallerChainTestCase(String name)
- {
- super(name);
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite("RebuildCallerChainTestCase");
- suite.addTestSuite(RebuildCallerChainTestCase.class);
- return suite;
- }
-
- public void testRebuildCallerChain() throws Exception
- {
- try
- {
- new Caller1().execute();
-
- AdviceBinding bindingCall = new AdviceBinding(
- "call(* org.jboss.test.aop.rebuildcallerchain.*->execute())", null);
- bindingCall.addInterceptor(RebuildCallerChainInterceptor.class);
-
- AspectManager.instance().addBinding(bindingCall);
-
- new Caller1().execute(); // loaded before addBinding => not ok
- new Caller2().execute(); // loaded after addBindingok => ok
-
- assertTrue("Rebuilded chain", true);
- }
- catch (Exception e)
- {
- assertFalse("Failed to rebuild chain....", true);
- }
-}
-
-}
Copied: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java (from rev 71182, projects/aop/trunk/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildcallerchain/RebuildCallerChainTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.rebuildcallerchain;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.AdviceBinding;
+import org.jboss.test.aop.AOPTestWithSetup;
+
+/**
+ * A RebuildCallerChainTestCase.
+ *
+ * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RebuildCallerChainTestCase extends AOPTestWithSetup
+{
+
+ public RebuildCallerChainTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("RebuildCallerChainTestCase");
+ suite.addTestSuite(RebuildCallerChainTestCase.class);
+ return suite;
+ }
+
+ public void testRebuildCallerChain() throws Exception
+ {
+ try
+ {
+ new Caller1().execute();
+
+ AdviceBinding bindingCall = new AdviceBinding(
+ "call(* org.jboss.test.aop.rebuildcallerchain.*->execute())", null);
+ bindingCall.addInterceptor(RebuildCallerChainInterceptor.class);
+
+ AspectManager.instance().addBinding(bindingCall);
+
+ new Caller1().execute(); // loaded before addBinding => not ok
+ new Caller2().execute(); // loaded after addBindingok => ok
+
+ assertTrue("Rebuilded chain", true);
+ }
+ catch (Exception e)
+ {
+ assertFalse("Failed to rebuild chain....", true);
+ }
+}
+
+}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildThread.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildThread.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildThread.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,37 +33,27 @@
*/
public class RebuildThread extends Thread
{
- private static volatile boolean done = false;
-
- private int id = 0;
+
@Override
public void run()
{
for(int i=0; i < 30; i++)
{
- linkNewAdvice();
- unlinkAdvice();
-
- if(isDone())
- return;
+ linkNewAdvice("Test" + i);
+ unlinkAdvice("Test" + i);
}
}
-
- public void setDone(boolean b)
+
+ public void linkNewAdvice()
{
- done = b;
+ linkNewAdvice("Base");
}
-
- public boolean isDone()
+
+ private void linkNewAdvice(String name)
{
- return done;
- }
-
- public void linkNewAdvice()
- {
-// System.out.println("adding new advice");
+ //System.out.println("adding new advice" + name);
AdviceBinding binding1 = null;
try
{
@@ -74,15 +64,14 @@
e.printStackTrace();
}
binding1.addInterceptor(SyncInterceptor.class);
- binding1.setName(Integer.toString(id));
+ binding1.setName(name);
AspectManager.instance().addBinding(binding1);
- id++;
}
- public void unlinkAdvice()
+ private void unlinkAdvice(String name)
{
-// System.out.println("unlinking "+(id-1));
- AspectManager.instance().removeBinding(Integer.toString((id-1)));
+ //System.out.println("unlinking " + name);
+ AspectManager.instance().removeBinding(name);
}
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildingChainTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildingChainTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/RebuildingChainTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -24,9 +24,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.aop.AspectManager;
import org.jboss.test.aop.AOPTestWithSetup;
-import org.jboss.test.aop.override.OverrideTestCase;
/**
* A TestRebuildingChain.
@@ -59,10 +57,30 @@
RebuildThread rt = new RebuildThread();
rt.linkNewAdvice();
+ Thread.sleep(10000);
+
rt.start();
+ //rt.join();
st.start();
- try
+ rt.join();
+ st.join();
+
+ assertFalse("Failed to match pointcut when rebuilding the chain....", failed);
+ }
+
+ public void testRebuildingChainWithJoin() throws Exception
+ {
+ System.out.println("testing rebuildingchain!");
+// AspectManager.instance().verbose = true;
+ SyncThread st = new SyncThread();
+ RebuildThread rt = new RebuildThread();
+ rt.linkNewAdvice();
+
+ rt.start();
+ st.start();
+
+ /*try
{
long start = System.currentTimeMillis();
Thread.sleep(20);
@@ -72,9 +90,12 @@
{
System.err.println("BAH "+ie.getMessage());
}
+ */
+ //st.setDone(true);
+ //rt.setDone(true);
- st.setDone(true);
- rt.setDone(true);
+ st.join();
+ rt.join();
assertFalse("Failed to match pointcut when rebuilding the chain....", failed);
}
@@ -83,4 +104,17 @@
{
failed = true;
}
+
+ /*public static void main(String[] args)throws Exception
+ {
+ try
+ {
+ RebuildingChainTestCase test = new RebuildingChainTestCase("XXX");
+ test.testRebuildingChain();
+ }
+ catch (RuntimeException e)
+ {
+ System.err.println(e);
+ }
+ }*/
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -40,10 +40,12 @@
}
//@Override
- public Object invoke(Invocation invocation) throws Throwable
+ public synchronized Object invoke(Invocation invocation) throws Throwable
{
+ long time = System.currentTimeMillis();
try
{
+ System.out.println("SyncInterceptor: " + time);
SyncThread.setStatus(true);
return invocation.invokeNext();
}
@@ -54,9 +56,7 @@
finally
{
SyncThread.setStatus(false);
+ System.out.println("SyncInterceptor EXITED");
}
}
-
-
-
-}
+}
\ No newline at end of file
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncThread.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncThread.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/rebuildingchain/SyncThread.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,26 +29,24 @@
*/
public class SyncThread extends Thread
{
+ private static Object lock = new Object();
private static volatile boolean status = false;
- private volatile boolean done = false;
-
+
@Override
public void run()
{
-
- for(int i=0; i < 30; i++)
- {
- checkStatus();
+ for(int i=0; i < 30; i++)
+ {
- if(isDone())
- return;
-
+ checkStatus();
}
}
private void checkStatus()
{
-// System.out.println("checking status...");
+ long time = System.currentTimeMillis();
+ System.out.println("CHECKING STATUS: " + time);
+ System.out.println("ST checking status...");
if(getStatus() == false)
{
RebuildingChainTestCase.setTestFailed();
@@ -58,21 +56,17 @@
public static boolean getStatus()
{
- return status;
+ synchronized(lock)
+ {
+ return status;
+ }
}
public static void setStatus(boolean b)
{
- status = b;
+ synchronized(lock)
+ {
+ status = b;
+ }
}
-
- public void setDone(boolean b)
- {
- done = b;
- }
-
- private boolean isDone()
- {
- return done;
- }
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionAspectTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionAspectTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionAspectTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="mailto:kabirkhan at bigfoot.com">Kabir Khan</a>
*/
+ at SuppressWarnings("unchecked")
public class ReflectionAspectTester extends ReflectionAspect
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionPOJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionPOJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/reflection/ReflectionPOJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* @author <a href="mailto:kabirkhan at bigfoot.com">Kabir Khan</a>
*/
+ at SuppressWarnings("unchecked")
public class ReflectionPOJO
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/inheritedmcall/AOPTester.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/inheritedmcall/AOPTester.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/inheritedmcall/AOPTester.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class AOPTester extends AOPTestWithSetup
{
public static Test suite()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/InnerClassTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/InnerClassTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/InnerClassTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class InnerClassTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/POJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/POJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop110/POJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class POJO
{
NormalType nt;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop137/AnExtender.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop137/AnExtender.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop137/AnExtender.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -37,6 +37,6 @@
public void setExtender(int other)
{
- this.extender = extender;
+ this.extender = other;
}
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop197/OwnConstructorTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop197/OwnConstructorTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop197/OwnConstructorTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class OwnConstructorTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/AnnotationOverrideTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/AnnotationOverrideTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/AnnotationOverrideTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -62,7 +62,7 @@
checkAnnotations(Introduced.class);
}
- private void checkAnnotations(Class annotation) throws Exception
+ private void checkAnnotations(Class<?> annotation) throws Exception
{
TestInterceptor.annotation = annotation;
@@ -93,7 +93,7 @@
}
- private void checkValue(Object annotation, Class expectedClass, int expectedValue) throws Exception
+ private void checkValue(Object annotation, Class<?> expectedClass, int expectedValue) throws Exception
{
assertNotNull(annotation);
assertTrue(expectedClass.isAssignableFrom(annotation.getClass()));
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/TestInterceptor.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/TestInterceptor.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop248annotationoverride/TestInterceptor.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unchecked")
public class TestInterceptor implements Interceptor
{
public static Class annotation;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/POJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/POJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/POJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -26,6 +26,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class POJO
{
private long _foo;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/TestAspect.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/TestAspect.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/TestAspect.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,6 +30,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unchecked")
public class TestAspect
{
public static HashSet fields = new HashSet();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/UnderscoreInFieldNameTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/UnderscoreInFieldNameTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop264underscorefieldname/UnderscoreInFieldNameTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class UnderscoreInFieldNameTestCase extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -40,6 +40,7 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision: 45977 $
*/
+ at SuppressWarnings("unchecked")
public class AnnotationsInWrapperMethodOnlyTestCase extends AOPTestWithSetup
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop398nosuchfield/POJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop398nosuchfield/POJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop398nosuchfield/POJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -22,6 +22,7 @@
package org.jboss.test.aop.regression.jbaop398nosuchfield;
+ at SuppressWarnings("unused")
public class POJO
{
private static String org = "Fail";
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop442instancedomain/InstanceDomainTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop442instancedomain/InstanceDomainTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop442instancedomain/InstanceDomainTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -36,6 +36,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings("unused")
public class InstanceDomainTestCase extends TestCase
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop484superproxyadvised/SuperClassIsAdvisedByProxyTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop484superproxyadvised/SuperClassIsAdvisedByProxyTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/regression/jbaop484superproxyadvised/SuperClassIsAdvisedByProxyTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -165,7 +165,7 @@
}
- private String addBinding(String pointcut, Class interceptor) throws ParseException
+ private String addBinding(String pointcut, Class<?> interceptor) throws ParseException
{
AdviceBinding binding = new AdviceBinding(pointcut, null);
String name = binding.getName();
@@ -187,7 +187,7 @@
return proxyFactory.createAdvisedProxy(params);
}
- protected Object createProxy(Object target, Class[] interfaces) throws Exception
+ protected Object createProxy(Object target, Class<?>[] interfaces) throws Exception
{
AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
params.setProxiedClass(target.getClass());
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/Interceptions.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/Interceptions.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/Interceptions.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unchecked")
public class Interceptions
{
static ArrayList interceptions = new ArrayList();
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/ScopeTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/ScopeTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/scope/ScopeTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unused", "unchecked"})
public class ScopeTestCase extends AOPTestWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/POJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/POJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/POJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,6 +30,8 @@
*/
public class POJO implements Serializable
{
+ private static final long serialVersionUID = 1L;
+
public void someMethod() throws Exception
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/Proxied.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/Proxied.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/serialization/simple/Proxied.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,6 +30,8 @@
*/
public class Proxied implements Serializable
{
+ private static final long serialVersionUID = 1L;
+
public void someMethod()
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioPropertyReaderFactory.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioPropertyReaderFactory.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioPropertyReaderFactory.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings("unchecked")
public class ScenarioPropertyReaderFactory
{
Class testCaseClass;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unchecked")
public class ScenarioRunner
{
private Class testCaseClass;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unchecked")
public class ScenarioTest extends AbstractTestCaseWithSetup
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings("unchecked")
public class ScenarioTestDelegate extends AbstractTestDelegate
{
ScenarioRunner runner;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -21,8 +21,6 @@
*/
package org.jboss.test.aop.stress.batf;
-import org.jboss.aop.joinpoint.Invocation;
-
/**
*
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings("unused")
public class PerInstanceTestCase extends ScenarioTest
{
public static void main(String[] args)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -36,6 +36,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class LargePojo
{
//Add loads of fields and methods to try to make this slow to load up so we get synchronization issues
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings({"unchecked", "unused"})
public class SimpleReflectToJavassistTestCase extends ScenarioTest
{
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/Factory.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/Factory.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/Factory.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -28,6 +28,6 @@
*/
public interface Factory
{
- public Class loadClass();
+ public Class<?> loadClass();
public MethodCaller create();
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/GenerateClassesTestDelegate.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/GenerateClassesTestDelegate.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/GenerateClassesTestDelegate.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -36,7 +36,7 @@
private Factory[] wovenFactories;
private Factory[] vanillaFactories;
- public GenerateClassesTestDelegate(Class clazz)
+ public GenerateClassesTestDelegate(Class<?> clazz)
{
super(clazz);
}
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/WeaveManyClassesTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/WeaveManyClassesTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/stress/weavetest/WeaveManyClassesTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings("unused")
public class WeaveManyClassesTestCase extends ScenarioTest
{
@@ -40,7 +41,7 @@
super(arg0);
}
- public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
+ public static AbstractTestDelegate getDelegate(Class<?> clazz) throws Exception
{
//The delegate is called once and generates the classes
GenerateClassesTestDelegate delegate = new GenerateClassesTestDelegate(clazz);
@@ -71,7 +72,7 @@
public void execute(int thread, int loop) throws Exception
{
- Class clazz = factories[loop].loadClass();
+ Class<?> clazz = factories[loop].loadClass();
if (clazz == null)
{
throw new RuntimeException("Class was null");
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/BeforeAfterThrowingTestCase.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/BeforeAfterThrowingTestCase.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/BeforeAfterThrowingTestCase.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,7 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
+ at SuppressWarnings("unused")
public class BeforeAfterThrowingTestCase extends AOPTestWithSetup
{
public BeforeAfterThrowingTestCase(String arg0)
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/TestException.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/TestException.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/typedAdvices/TestException.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -29,6 +29,8 @@
public class TestException extends Exception
{
+ private static final long serialVersionUID = 1L;
+
public TestException()
{
// FIXME TestException constructor
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ClassTypeTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ClassTypeTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ClassTypeTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -33,6 +33,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unchecked")
public class ClassTypeTest extends VariableTargetAlgorithmTest
{
public void test1()
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/FromVariableAlgorithmTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/FromVariableAlgorithmTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/FromVariableAlgorithmTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -34,6 +34,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unchecked")
public class FromVariableAlgorithmTest extends TestCase
{
AssignabilityAlgorithm algorithm;
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/GenericArrayTypeTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/GenericArrayTypeTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/GenericArrayTypeTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,6 +30,7 @@
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*
*/
+ at SuppressWarnings("unchecked")
public class GenericArrayTypeTest extends VariableTargetAlgorithmTest
{
// Scenario 1
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromArrayTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromArrayTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromArrayTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,6 +30,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unchecked")
public class ParameterizedTypeFromArrayTest extends ParameterizedTypeTest
{
// Scenario 1
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromClassTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromClassTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromClassTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -23,7 +23,6 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@@ -32,6 +31,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unchecked")
public class ParameterizedTypeFromClassTest extends ParameterizedTypeTest
{
// Scenario 1
@@ -2347,11 +2347,11 @@
}
}
-class Class1 extends ArrayList<String>{}
-class Class2<D> extends ArrayList<D>{}
-class Class3<D> extends ArrayList<String>{}
-class Class4 extends ArrayList{}
-class Class5<A,B> extends HashMap<B,A>{}
-class Class6<D extends String> extends ArrayList<D>{}
-class Class7<A,B> extends ArrayList<String>{}
-class Class8<A,B> extends HashMap<String,Integer>{}
\ No newline at end of file
+ at SuppressWarnings("serial")class Class1 extends ArrayList<String>{}
+ at SuppressWarnings("serial")class Class2<D> extends ArrayList<D>{}
+ at SuppressWarnings("serial")class Class3<D> extends ArrayList<String>{}
+ at SuppressWarnings({"serial", "unchecked"})class Class4 extends ArrayList{}
+ at SuppressWarnings("serial")class Class5<A,B> extends HashMap<B,A>{}
+ at SuppressWarnings("serial")class Class6<D extends String> extends ArrayList<D>{}
+ at SuppressWarnings("serial")class Class7<A,B> extends ArrayList<String>{}
+ at SuppressWarnings("serial")class Class8<A,B> extends HashMap<String,Integer>{}
\ No newline at end of file
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromParamTypeTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromParamTypeTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromParamTypeTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*
*/
+ at SuppressWarnings("unchecked")
public class ParameterizedTypeFromParamTypeTest extends ParameterizedTypeTest
{
// Scenario 1
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromVariableTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromVariableTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeFromVariableTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -31,6 +31,7 @@
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*
*/
+ at SuppressWarnings("unchecked")
public class ParameterizedTypeFromVariableTest extends ParameterizedTypeTest
{
// Scenario 1
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/ParameterizedTypeTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -30,6 +30,7 @@
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*
*/
+ at SuppressWarnings("unchecked")
public class ParameterizedTypeTest extends VariableTargetAlgorithmTest
{
protected <A> void called1(ArrayList<A> arg) {}
@@ -51,16 +52,17 @@
protected void called17(HashMap<Integer,String> a) {}
}
-class MyClass1 extends MyClass2{}
-class MyClass2<A extends Runnable> extends MyClass3<A>{}
-class MyClass3<A> extends ArrayList<A>{}
-class NewClass2<A> extends NewClass1{}
-class NewClass3<A> extends MyClass2{}
-class NewClass1<A> extends NewClass{}
-class NewClass extends MyClass2<Runnable>{}
+ at SuppressWarnings({"serial","unchecked"})class MyClass1 extends MyClass2{}
+ at SuppressWarnings("serial")class MyClass2<A extends Runnable> extends MyClass3<A>{}
+ at SuppressWarnings("serial")class MyClass3<A> extends ArrayList<A>{}
-class MyClass_<A extends Serializable, B> extends MyClass2_<A>{}
-class MyClass2_<A extends Serializable> extends HashMap<String, A>{}
+ at SuppressWarnings({"serial","unchecked"})class NewClass2<A> extends NewClass1{}
+ at SuppressWarnings({"serial","unchecked"})class NewClass3<A> extends MyClass2{}
+ at SuppressWarnings("serial")class NewClass1<A> extends NewClass{}
+ at SuppressWarnings("serial")class NewClass extends MyClass2<Runnable>{}
-class MyClass3_<A extends Serializable, B> extends MyClass2_{}
\ No newline at end of file
+ at SuppressWarnings("serial")class MyClass_<A extends Serializable, B> extends MyClass2_<A>{}
+ at SuppressWarnings("serial")class MyClass2_<A extends Serializable> extends HashMap<String, A>{}
+
+ at SuppressWarnings({"serial","unchecked"})class MyClass3_<A extends Serializable, B> extends MyClass2_{}
\ No newline at end of file
Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/TypeVariableTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/TypeVariableTest.java 2008-03-24 03:56:27 UTC (rev 71187)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/test/aop/unit/assignability/TypeVariableTest.java 2008-03-24 04:11:52 UTC (rev 71188)
@@ -32,6 +32,7 @@
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
*/
+ at SuppressWarnings("unchecked")
public class TypeVariableTest extends VariableTargetAlgorithmTest
{
// Scenario 1
More information about the jboss-cvs-commits
mailing list