[jboss-cvs] JBossAS SVN: r66042 - in projects/aop/trunk/aop/src: test/org/jboss/test/aop/annotatedAdviceParams and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 11 15:08:32 EDT 2007


Author: flavia.rainone at jboss.com
Date: 2007-10-11 15:08:32 -0400 (Thu, 11 Oct 2007)
New Revision: 66042

Modified:
   projects/aop/trunk/aop/src/resources/test/annotatedAdviceParams/jboss-aop.xml
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidJDK50TestCase.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidPOJO.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnJDK50TestCase.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnPOJO.java
Log:
[JBAOP-472] Added @Return tests on call joinpoints.

Modified: projects/aop/trunk/aop/src/resources/test/annotatedAdviceParams/jboss-aop.xml
===================================================================
--- projects/aop/trunk/aop/src/resources/test/annotatedAdviceParams/jboss-aop.xml	2007-10-11 18:37:40 UTC (rev 66041)
+++ projects/aop/trunk/aop/src/resources/test/annotatedAdviceParams/jboss-aop.xml	2007-10-11 19:08:32 UTC (rev 66042)
@@ -1126,7 +1126,8 @@
    
    <aspect class="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics" scope="PER_VM"/>
 
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnPOJO->*(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnPOJO->*Execution(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnPOJO->*Call(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnPOJO->*)">
       <around name="around3" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
       <around name="around6" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
@@ -1145,77 +1146,92 @@
       <finally name="finally11" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around1(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAround1(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAround1(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around1)">
       <around name="around1" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around2(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAround2(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAround2(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around2)">
       <around name="around2" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around4(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAround4(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAround4(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around4)">
       <around name="around4" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around5(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAround5(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAround5(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around5)">
       <around name="around5" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around6(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAround6(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAround6(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around6)">
       <around name="around6" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around7(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAround7(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAround7(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around7)">
       <around name="around7" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around8(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAround8(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAround8(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Around8)">
       <around name="around8" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*After5(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAfter5(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAfter5(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*After5)">
       <after name="after5" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*After7(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAfter7(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAfter7(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*After7)">
       <after name="after7" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*After8(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionAfter8(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallAfter8(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*After8)">
       <after name="after8" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally5(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionFinally5(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallFinally5(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally5)">
       <after name="finally5" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally7(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionFinally7(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallFinally7(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally7)">
       <after name="finally7" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally8(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionFinally8(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallFinally8(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally8)">
       <after name="finally8" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally9(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionFinally9(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallFinally9(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally9)">
       <after name="finally9" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>
    
-   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally10(..))
+   <bind pointcut="execution(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*ExecutionFinally10(..))
+      OR call(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*CallFinally10(..))
       OR get(java.util.List org.jboss.test.aop.annotatedAdviceParams.ReturnInvalidPOJO->*Finally10)">
       <after name="finally10" aspect="org.jboss.test.aop.annotatedAdviceParams.ReturnAspectGenerics"/>
    </bind>

Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidJDK50TestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidJDK50TestCase.java	2007-10-11 18:37:40 UTC (rev 66041)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidJDK50TestCase.java	2007-10-11 19:08:32 UTC (rev 66042)
@@ -62,12 +62,12 @@
       this.pojo = new ReturnInvalidPOJO();
    }
    
-   public void testGenerics1()
+   public void testGenericsExecution()
    {
       boolean thrown = false;
       try
       {
-         pojo.methodGenericsAround1();
+         pojo.methodGenericsExecutionAround1();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -78,7 +78,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAround2();
+         pojo.methodGenericsExecutionAround2();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -89,7 +89,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAround4();
+         pojo.methodGenericsExecutionAround4();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -100,7 +100,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAround5();
+         pojo.methodGenericsExecutionAround5();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -111,7 +111,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAround7();
+         pojo.methodGenericsExecutionAround7();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -122,7 +122,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAround8();
+         pojo.methodGenericsExecutionAround8();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -133,7 +133,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAfter5();
+         pojo.methodGenericsExecutionAfter5();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -144,7 +144,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAfter7();
+         pojo.methodGenericsExecutionAfter7();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -155,7 +155,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsAfter8();
+         pojo.methodGenericsExecutionAfter8();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -166,7 +166,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsFinally5();
+         pojo.methodGenericsExecutionFinally5();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -177,7 +177,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsFinally7();
+         pojo.methodGenericsExecutionFinally7();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -188,7 +188,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsFinally8();
+         pojo.methodGenericsExecutionFinally8();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -199,7 +199,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsFinally9();
+         pojo.methodGenericsExecutionFinally9();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -210,7 +210,7 @@
       thrown = false;
       try
       {
-         pojo.methodGenericsFinally10();
+         pojo.methodGenericsExecutionFinally10();
       }
       catch (NoMatchingAdviceException e)
       {
@@ -219,7 +219,7 @@
       assertTrue(thrown);
    }
    
-   public void testGenerics2()
+   public void testGenericsFieldRead()
    {
       boolean thrown = false;
       try
@@ -375,4 +375,161 @@
       }
       assertTrue(thrown);
    }
+   
+   public void testGenericsCall()
+   {
+      boolean thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAround1();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAround2();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAround4();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAround5();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAround7();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAround8();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAfter5();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAfter7();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+      
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallAfter8();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+      
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallFinally5();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+      
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallFinally7();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+      
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallFinally8();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+      
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallFinally9();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+      
+      thrown = false;
+      try
+      {
+         pojo.methodGenericsCallFinally10();
+      }
+      catch (NoMatchingAdviceException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+   }
 }
\ No newline at end of file

Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidPOJO.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidPOJO.java	2007-10-11 18:37:40 UTC (rev 66041)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnInvalidPOJO.java	2007-10-11 19:08:32 UTC (rev 66042)
@@ -154,75 +154,147 @@
       return new SuperValue(10);
    }
    
-   /* methodGenerics() */
+   /* methodGenericsExecution() */
    
-   public List<SuperValue> methodGenericsAround1()
+   public List<SuperValue> methodGenericsExecutionAround1()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAround2()
+   public List<SuperValue> methodGenericsExecutionAround2()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAround4()
+   public List<SuperValue> methodGenericsExecutionAround4()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAround5()
+   public List<SuperValue> methodGenericsExecutionAround5()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAround7()
+   public List<SuperValue> methodGenericsExecutionAround7()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAround8()
+   public List<SuperValue> methodGenericsExecutionAround8()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAfter5()
+   public List<SuperValue> methodGenericsExecutionAfter5()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAfter7()
+   public List<SuperValue> methodGenericsExecutionAfter7()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsAfter8()
+   public List<SuperValue> methodGenericsExecutionAfter8()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsFinally5()
+   public List<SuperValue> methodGenericsExecutionFinally5()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsFinally7()
+   public List<SuperValue> methodGenericsExecutionFinally7()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsFinally8()
+   public List<SuperValue> methodGenericsExecutionFinally8()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsFinally9()
+   public List<SuperValue> methodGenericsExecutionFinally9()
    {
       return null;
    }
    
-   public List<SuperValue> methodGenericsFinally10()
+   public List<SuperValue> methodGenericsExecutionFinally10()
    {
       return null;
    }
+   
+   /* methodGenericsCall() */
+   
+   public List<SuperValue> methodGenericsCallAround1()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAround2()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAround4()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAround5()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAround7()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAround8()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAfter5()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAfter7()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallAfter8()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallFinally5()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallFinally7()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallFinally8()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallFinally9()
+   {
+      return null;
+   }
+   
+   public List<SuperValue> methodGenericsCallFinally10()
+   {
+      return null;
+   }
 }
\ No newline at end of file

Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnJDK50TestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnJDK50TestCase.java	2007-10-11 18:37:40 UTC (rev 66041)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnJDK50TestCase.java	2007-10-11 19:08:32 UTC (rev 66042)
@@ -61,67 +61,65 @@
       this.pojo = new ReturnPOJO();
    }
    
-   public void testGenerics1() throws Exception
+   public void testGenericsExecution() throws POJOException
    {
-      pojo.methodGenerics(false);
-      assertTrue(ReturnAspectGenerics.around3);
-      assertTrue(ReturnAspectGenerics.after1);
-      assertTrue(ReturnAspectGenerics.after2);
-      assertTrue(ReturnAspectGenerics.after3);
-      assertTrue(ReturnAspectGenerics.after4);
-      assertTrue(ReturnAspectGenerics.after6);
-      assertTrue(ReturnAspectGenerics.after9);
-      assertTrue(ReturnAspectGenerics.after10);
-      assertTrue(ReturnAspectGenerics.finally1);
-      assertTrue(ReturnAspectGenerics.finally2);
-      assertTrue(ReturnAspectGenerics.finally3);
-      assertTrue(ReturnAspectGenerics.finally4);
-      assertTrue(ReturnAspectGenerics.finally6);
-      assertTrue(ReturnAspectGenerics.finally11);
+      pojo.methodGenericsExecution(false);
+      assertGenericsAdvices(false);
    }
    
-   public void testGenerics2() throws Exception
+   public void testGenericsExecutionWithException()
    {
       boolean thrown = false;
       try
       {
-         pojo.methodGenerics(true);
+         pojo.methodGenericsExecution(true);
       }
-      catch (Throwable t)
+      catch (POJOException e)
       {
          thrown = true;
       }
       assertTrue(thrown);
-      
-      assertTrue(ReturnAspectGenerics.around3);
-      assertTrue(ReturnAspectGenerics.around6);
-      assertFalse(ReturnAspectGenerics.after1);
-      assertFalse(ReturnAspectGenerics.after2);
-      assertFalse(ReturnAspectGenerics.after3);
-      assertFalse(ReturnAspectGenerics.after4);
-      assertFalse(ReturnAspectGenerics.after6);
-      assertFalse(ReturnAspectGenerics.after9);
-      assertFalse(ReturnAspectGenerics.after10);
-      assertTrue(ReturnAspectGenerics.finally1);
-      assertTrue(ReturnAspectGenerics.finally2);
-      assertTrue(ReturnAspectGenerics.finally3);
-      assertTrue(ReturnAspectGenerics.finally4);
-      assertTrue(ReturnAspectGenerics.finally6);
-      assertTrue(ReturnAspectGenerics.finally11);
+      assertGenericsAdvices(thrown);
    }
    
-   public void testGenerics3() throws Exception
+   public void testGenericsFieldRead()
    {
       assertNull(pojo.fieldGenerics);
-      
+      assertGenericsAdvices(false);
+   }
+   
+   public void testGenericsCall() throws POJOException
+   {
+      pojo.methodGenericsCall(false);
+      assertGenericsAdvices(false);
+   }
+   
+   public void testGenericsCallWithException()
+   {
+      boolean thrown = false;
+      try
+      {
+         pojo.methodGenericsCall(true);
+      }
+      catch (POJOException e)
+      {
+         thrown = true;
+      }
+      assertTrue(thrown);
+      assertGenericsAdvices(thrown);
+   }
+
+   private void assertGenericsAdvices(boolean thrown)
+   {
       assertTrue(ReturnAspectGenerics.around3);
-      assertTrue(ReturnAspectGenerics.after1);
-      assertTrue(ReturnAspectGenerics.after2);
-      assertTrue(ReturnAspectGenerics.after3);
-      assertTrue(ReturnAspectGenerics.after4);
-      assertTrue(ReturnAspectGenerics.after6);
-      assertTrue(ReturnAspectGenerics.after9);
-      assertTrue(ReturnAspectGenerics.after10);
+      assertTrue(ReturnAspectGenerics.around6);
+      assertEquals(!thrown, ReturnAspectGenerics.after1);
+      assertEquals(!thrown, ReturnAspectGenerics.after2);
+      assertEquals(!thrown, ReturnAspectGenerics.after3);
+      assertEquals(!thrown, ReturnAspectGenerics.after4);
+      assertEquals(!thrown, ReturnAspectGenerics.after6);
+      assertEquals(!thrown, ReturnAspectGenerics.after9);
+      assertEquals(!thrown, ReturnAspectGenerics.after10);
       assertTrue(ReturnAspectGenerics.finally1);
       assertTrue(ReturnAspectGenerics.finally2);
       assertTrue(ReturnAspectGenerics.finally3);

Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnPOJO.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnPOJO.java	2007-10-11 18:37:40 UTC (rev 66041)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/annotatedAdviceParams/ReturnPOJO.java	2007-10-11 19:08:32 UTC (rev 66042)
@@ -101,7 +101,7 @@
       throw new POJOException();
    }
    
-   public List<SuperValue> methodGenerics(boolean throwException)
+   public List<SuperValue> methodGenericsExecution(boolean throwException)
    throws POJOException
    {
       if (throwException)
@@ -110,4 +110,14 @@
       }
       return null;
    }
+   
+   public List<SuperValue> methodGenericsCall(boolean throwException)
+   throws POJOException
+   {
+      if (throwException)
+      {
+         throw new POJOException();
+      }
+      return null;
+   }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list