[jboss-cvs] JBossAS SVN: r87383 - in projects/aop/trunk/asintegration-mc: src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 15 12:54:05 EDT 2009


Author: kabir.khan at jboss.com
Date: 2009-04-15 12:54:04 -0400 (Wed, 15 Apr 2009)
New Revision: 87383

Modified:
   projects/aop/trunk/asintegration-mc/.classpath
   projects/aop/trunk/asintegration-mc/pom.xml
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspectFactory.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java
   projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java
   projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml
Log:
[JBAOP-707] Test aspects for fields and constructors, as well as methods

Modified: projects/aop/trunk/asintegration-mc/.classpath
===================================================================
--- projects/aop/trunk/asintegration-mc/.classpath	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/.classpath	2009-04-15 16:54:04 UTC (rev 87383)
@@ -2,8 +2,8 @@
 <classpath>
 	<classpathentry kind="src" path="src/main/java"/>
 	<classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
-	<classpathentry excluding="org/jboss/test/aop/classpool/jbosscl/support/excluded/|org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/" kind="src" output="target/test-classes" path="src/test/java"/>
-	<!--classpathentry kind="src" output="target/test-classes" path="src/test/java"/-->
+	<!--classpathentry excluding="org/jboss/test/aop/classpool/jbosscl/support/excluded/|org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/" kind="src" output="target/test-classes" path="src/test/java"/-->
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
 	<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>

Modified: projects/aop/trunk/asintegration-mc/pom.xml
===================================================================
--- projects/aop/trunk/asintegration-mc/pom.xml	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/pom.xml	2009-04-15 16:54:04 UTC (rev 87383)
@@ -53,7 +53,8 @@
           </includes>
           <excludes>
             <exclude>org/jboss/test/aop/integration/complex/test/ComplexImportMultipleVersionsUnitTestCase.class</exclude>
-            <exclude>org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase.class</exclude>
+            <exclude>org/jboss/test/aop/classpool/jbosscl/weaving/test/ClassicWeavingTestCase.class</exclude>
+            <exclude>org/jboss/test/aop/classpool/jbosscl/weaving/test/GeneratedAdvisorWeavingTestCase.class</exclude>
           </excludes>
           <systemProperties>
             <property>

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{elbc}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{elac}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{elfc}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{elbcj}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{elacj}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{elfcj}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{elbi}");;
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{elai}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{elfi}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{elbj}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{elaj}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{elfj}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{elbv}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{elav}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{elfv}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -105,10 +105,20 @@
       Interceptions.clear();
       POJOWithInterceptor pojo = new POJOWithInterceptor();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("(eiv)(eij)(eicj)(eic)(iiv)(iij)(iicj)(iic){iic}{iicj}{iij}{iiv}{eic}{eicj}{eij}{eiv}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
       Interceptions.assertEquals("(eiv)(eij)(eii)(eicj)(eic)(iiv)(iij)(iii)(iicj)(iic)XXX{iic}{iicj}{iii}{iij}{iiv}{eic}{eicj}{eii}{eij}{eiv}");
+      
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("(eiv)(eij)(eii)(eicj)(eic)(iiv)(iij)(iii)(iicj)(iic){iic}{iicj}{iii}{iij}{iiv}{eic}{eicj}{eii}{eij}{eiv}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("(eiv)(eij)(eii)(eicj)(eic)(iiv)(iij)(iii)(iicj)(iic){iic}{iicj}{iii}{iij}{iiv}{eic}{eicj}{eii}{eij}{eiv}");
    }
    
    private static void testAspect()
@@ -116,10 +126,20 @@
       Interceptions.clear();
       POJOWithAspect pojo = new POJOWithAspect();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("(eav)(eaj)(eacj)(eac)(iav)(iaj)(iacj)(iac){iac}{iacj}{iaj}{iav}{eac}{eacj}{eaj}{eav}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
       Interceptions.assertEquals("(eav)(eaj)(eai)(eacj)(eac)(iav)(iaj)(iai)(iacj)(iac)XXX{iac}{iacj}{iai}{iaj}{iav}{eac}{eacj}{eai}{eaj}{eav}");
+      
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("(eav)(eaj)(eai)(eacj)(eac)(iav)(iaj)(iai)(iacj)(iac){iac}{iacj}{iai}{iaj}{iav}{eac}{eacj}{eai}{eaj}{eav}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("(eav)(eaj)(eai)(eacj)(eac)(iav)(iaj)(iai)(iacj)(iac){iac}{iacj}{iai}{iaj}{iav}{eac}{eacj}{eai}{eaj}{eav}");
    }
    
    private static void testAspectFactory()
@@ -127,10 +147,20 @@
       Interceptions.clear();
       POJOWithAspectFactory pojo = new POJOWithAspectFactory();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("(efav)(efaj)(efaj)(efac)(ifav)(ifaj)(ifaj)(ifac){ifac}{ifaj}{ifaj}{ifav}{efac}{efaj}{efaj}{efav}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
       Interceptions.assertEquals("(efav)(efacj)(efai)(efaj)(efac)(ifav)(ifacj)(ifai)(ifaj)(ifac)XXX{ifac}{ifaj}{ifai}{ifacj}{ifav}{efac}{efaj}{efai}{efacj}{efav}");
+      
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("(efav)(efacj)(efai)(efaj)(efac)(ifav)(ifacj)(ifai)(ifaj)(ifac){ifac}{ifaj}{ifai}{ifacj}{ifav}{efac}{efaj}{efai}{efacj}{efav}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("(efav)(efacj)(efai)(efaj)(efac)(ifav)(ifacj)(ifai)(ifaj)(ifac){ifac}{ifaj}{ifai}{ifacj}{ifav}{efac}{efaj}{efai}{efacj}{efav}");
    }
    
    private static void testLightweightAspect()
@@ -138,7 +168,11 @@
       Interceptions.clear();
       POJOWithLightweightAspect pojo = new POJOWithLightweightAspect();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("{elbv}{elbj}{elbcj}{elbc}{ilbv}{ilbj}" +
+            "{ilbcj}{ilbc}{elav}{elaj}{elacj}{elac}{ilav}{ilaj}" +
+            "{ilacj}{ilac}{elfv}{elfj}{elfcj}{elfc}{ilfv}{ilfj}{ilfcj}{ilfc}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
       
@@ -146,5 +180,16 @@
       		"{ilbcj}{ilbc}XXX{elav}{elaj}{elai}{elacj}{elac}{ilav}{ilaj}{ilai}" +
       		"{ilacj}{ilac}{elfv}{elfj}{elfi}{elfcj}{elfc}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
       
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("{elbv}{elbj}{elbi}{elbcj}{elbc}{ilbv}{ilbj}{ilbi}" +
+            "{ilbcj}{ilbc}{elav}{elaj}{elai}{elacj}{elac}{ilav}{ilaj}{ilai}" +
+            "{ilacj}{ilac}{elfv}{elfj}{elfi}{elfcj}{elfc}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("{elbv}{elbj}{elbi}{elbcj}{elbc}{ilbv}{ilbj}{ilbi}" +
+            "{ilbcj}{ilbc}{elav}{elaj}{elai}{elacj}{elac}{ilav}{ilaj}{ilai}" +
+            "{ilacj}{ilac}{elfv}{elfj}{elfi}{elfcj}{elfc}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{ilbc}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{ilac}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{ilfc}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{ilbcj}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{ilacj}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{ilfcj}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{ilbi}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{ilai}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{ilfi}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{ilbj}");
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{ilaj}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{ilfj}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -21,8 +21,6 @@
 */ 
 package org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target;
 
-import org.jboss.aop.advice.annotation.Return;
-import org.jboss.aop.advice.annotation.Thrown;
 import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
 
 /**
@@ -37,15 +35,13 @@
       Interceptions.append("{ilbv}");;
    }
    
-   public String after(@Return String rtn)
+   public void after()
    {
       Interceptions.append("{ilav}");
-      return rtn;
    }
    
-   public String finaly(@Thrown Throwable thrown, @Return String rtn)
+   public void finaly()
    {
       Interceptions.append("{ilfv}");
-      return rtn;
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -127,58 +127,92 @@
    private static void testInterceptor()
    {
       Interceptions.clear();
-      System.out.println("---> testInterceptor");
       POJOWithInterceptor pojo = new POJOWithInterceptor();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("(iiv)(iij)(iicj)(iic){iic}{iicj}{iij}{iiv}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
-
       Interceptions.assertEquals("(iiv)(iij)(iii)(iicj)(iic)XXX{iic}{iicj}{iii}{iij}{iiv}");
-      System.out.println("---> testInterceptor passed");
+      
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("(iiv)(iij)(iii)(iicj)(iic){iic}{iicj}{iii}{iij}{iiv}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("(iiv)(iij)(iii)(iicj)(iic){iic}{iicj}{iii}{iij}{iiv}");
    }
    
    private static void testAspect()
    {
       Interceptions.clear();
-      System.out.println("---> testAspect");
       POJOWithAspect pojo = new POJOWithAspect();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("(iav)(iaj)(iacj)(iac){iac}{iacj}{iaj}{iav}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
-
       Interceptions.assertEquals("(iav)(iaj)(iai)(iacj)(iac)XXX{iac}{iacj}{iai}{iaj}{iav}");
-      System.out.println("---> testAspect passed");
+      
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("(iav)(iaj)(iai)(iacj)(iac){iac}{iacj}{iai}{iaj}{iav}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("(iav)(iaj)(iai)(iacj)(iac){iac}{iacj}{iai}{iaj}{iav}");
    }
-
+   
    private static void testAspectFactory()
    {
       Interceptions.clear();
-      System.out.println("---> testAspectFactory");
       POJOWithAspectFactory pojo = new POJOWithAspectFactory();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("(ifav)(ifaj)(ifaj)(ifac){ifac}{ifaj}{ifaj}{ifav}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
       Interceptions.assertEquals("(ifav)(ifacj)(ifai)(ifaj)(ifac)XXX{ifac}{ifaj}{ifai}{ifacj}{ifav}");
-      System.out.println("---> testAspectFactory passed");
+      
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("(ifav)(ifacj)(ifai)(ifaj)(ifac){ifac}{ifaj}{ifai}{ifacj}{ifav}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("(ifav)(ifacj)(ifai)(ifaj)(ifac){ifac}{ifaj}{ifai}{ifacj}{ifav}");
    }
-   
 
    private static void testLightweightAspect()
    {
       Interceptions.clear();
-      System.out.println("---> testLightweightAspect");
       POJOWithLightweightAspect pojo = new POJOWithLightweightAspect();
       Assert.assertTrue(pojo instanceof Advised);
+      Interceptions.assertEquals("{ilbv}{ilbj}{ilbcj}{ilbc}{ilav}{ilaj}" +
+            "{ilacj}{ilac}{ilfv}{ilfj}{ilfcj}{ilfc}");
       
+      Interceptions.clear();
       String rtn = pojo.method("XXX");
       Assert.assertEquals("XXX", rtn);
       
-      Interceptions.assertEquals("{ilbv}{ilbj}{ilbi}{ilbcj}{ilbc}XXX{ilav}{ilaj}{ilai}" +
+      Interceptions.assertEquals("{ilbv}{ilbj}{ilbi}" +
+            "{ilbcj}{ilbc}XXX{ilav}{ilaj}{ilai}" +
             "{ilacj}{ilac}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
       
-      System.out.println("---> testLightweightAspect passed");
+      Interceptions.clear();
+      pojo.field = "ABC";
+      Interceptions.assertEquals("{ilbv}{ilbj}{ilbi}" +
+            "{ilbcj}{ilbc}{ilav}{ilaj}{ilai}" +
+            "{ilacj}{ilac}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
+      
+      Interceptions.clear();
+      Assert.assertEquals("ABC", pojo.field);
+      Interceptions.assertEquals("{ilbv}{ilbj}{ilbi}" +
+            "{ilbcj}{ilbc}{ilav}{ilaj}{ilai}" +
+            "{ilacj}{ilac}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
    }
 }

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -30,6 +30,8 @@
  */
 public class POJOWithAspect
 {
+   public String field;
+   
    public String method(String arg)
    {
       Interceptions.append(arg);

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspectFactory.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspectFactory.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspectFactory.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -30,6 +30,8 @@
  */
 public class POJOWithAspectFactory
 {
+   public String field;
+   
    public String method(String arg)
    {
       Interceptions.append(arg);

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -30,6 +30,8 @@
  */
 public class POJOWithInterceptor
 {
+   public String field;
+   
    public String method(String arg)
    {
       Interceptions.append(arg);

Modified: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java	2009-04-15 16:54:04 UTC (rev 87383)
@@ -30,6 +30,8 @@
  */
 public class POJOWithLightweightAspect
 {
+   public String field;
+   
    public String method(String msg)
    {
       Interceptions.append(msg);

Modified: projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml	2009-04-15 16:35:19 UTC (rev 87382)
+++ projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml	2009-04-15 16:54:04 UTC (rev 87383)
@@ -75,7 +75,7 @@
       @org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.IntroducedAnnotation
    </annotation-introduction>
    
-   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithInterceptor->method(java.lang.String))">
+   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithInterceptor->method(java.lang.String)) OR execution(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithInterceptor->new()) OR field(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithInterceptor->field)">
       <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerVm"/>
       <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerJoinpoint"/>
       <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerInstance"/>
@@ -88,7 +88,7 @@
       <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerClass"/>
    </bind>
    
-   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspect->method(java.lang.String))">
+   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspect->method(java.lang.String)) OR execution(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspect->new()) OR field(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspect->field)">
       <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerVm"/>
       <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerJoinpoint"/>
       <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerInstance"/>
@@ -101,7 +101,7 @@
       <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerClass"/>
    </bind>
    
-   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspectFactory->method(java.lang.String))">
+   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspectFactory->method(java.lang.String)) OR execution(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspectFactory->new()) OR field(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspectFactory->field)">
       <advice name="advice" aspect="externalFactoryPerVm"/>
       <advice name="advice" aspect="externalFactoryPerJoinpoint"/>
       <advice name="advice" aspect="externalFactoryPerInstance"/>
@@ -115,7 +115,7 @@
    </bind>
    
    
-   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithLightweightAspect->method(java.lang.String))">
+   <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithLightweightAspect->method(java.lang.String)) OR execution(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithLightweightAspect->new()) OR field(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithLightweightAspect->field)">
       <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerVm"/>
       <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerVm"/>
       <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerVm"/>




More information about the jboss-cvs-commits mailing list