[jboss-cvs] JBossAS SVN: r59107 - branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 18 18:57:37 EST 2006
Author: kabir.khan at jboss.com
Date: 2006-12-18 18:57:35 -0500 (Mon, 18 Dec 2006)
New Revision: 59107
Modified:
branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java
branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/POJO.java
branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/TestAnnotation.java
Log:
[JBAOP-329] Parameter annotations should exist in wrapper method and not the internal method. Get test working with JDK 1.4, still need to add a test testing the parameter annotations for jdk 5
Modified: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java 2006-12-18 23:18:47 UTC (rev 59106)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/AnnotationsInWrapperMethodOnlyTestCase.java 2006-12-18 23:57:35 UTC (rev 59107)
@@ -68,7 +68,6 @@
Advisor advisor = ((Advised)pojo)._getAdvisor();
ArrayList hasAnnotation = new ArrayList();
- ArrayList hasParameterAnnotation = new ArrayList();
for (int i = 0 ; i < methods.length ; i++)
{
Object ann = advisor.resolveAnnotation(methods[i], TestAnnotation.class);
@@ -76,24 +75,11 @@
{
hasAnnotation.add(methods[i].getName());
}
-
- CtMethod ctmethod = ReflectToJavassist.methodToJavassist(methods[i]);
- Object[][] paramAnnotations = ctmethod.getParameterAnnotations();
- for (int p = 0 ; p < paramAnnotations.length ; p++)
- {
- if (paramAnnotations[p].length > 0)
- {
- hasParameterAnnotation.add(methods[i].getName() + "1");
- }
- }
}
assertFalse("Expected to find annotation for 'method'", hasAnnotation.size() == 0);
- assertFalse("Expected to find parameter annotation for 'method'", hasParameterAnnotation.size() == 0);
assertTrue("Expected to find annotation for 'method' only, it was found for " + hasAnnotation, hasAnnotation.size() == 1);
- assertTrue("Expected to find parameter annotation for 'method' only, it was found for " + hasParameterAnnotation, hasAnnotation.size() == 1);
assertEquals("method", hasAnnotation.get(0));
- assertEquals("method1", hasParameterAnnotation.get(0));
assertTrue("Class was not woven", Advised.class.isAssignableFrom(POJO.class));
}
Modified: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/POJO.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/POJO.java 2006-12-18 23:18:47 UTC (rev 59106)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/POJO.java 2006-12-18 23:57:35 UTC (rev 59107)
@@ -28,8 +28,10 @@
*/
public class POJO
{
- @TestAnnotation
- public void method(int i, @TestAnnotation String s)
+ /**
+ * @@org.jboss.test.aop.regression.jbaop316annotationsinwrapperonly.TestAnnotation
+ */
+ public void method(int i, String s)
{
}
Modified: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/TestAnnotation.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/TestAnnotation.java 2006-12-18 23:18:47 UTC (rev 59106)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/regression/jbaop316annotationsinwrapperonly/TestAnnotation.java 2006-12-18 23:57:35 UTC (rev 59107)
@@ -29,7 +29,6 @@
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
- at Retention(RetentionPolicy.RUNTIME)
-public @interface TestAnnotation {
+public interface TestAnnotation {
}
More information about the jboss-cvs-commits
mailing list