[jboss-cvs] JBossAS SVN: r71720 - in projects/microcontainer/trunk/aop-mc-int/src: resources/tests/org/jboss/test/microcontainer/test and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Apr 4 07:34:44 EDT 2008
Author: alesj
Date: 2008-04-04 07:34:44 -0400 (Fri, 04 Apr 2008)
New Revision: 71720
Added:
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustClassAnnotatedBean.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustMethodAnnotatedBean.java
Modified:
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.java
Log:
Exclude JOINPOINT in levels check.
Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java 2008-04-04 05:21:22 UTC (rev 71719)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/integration/AOPConstructorJoinpoint.java 2008-04-04 11:34:44 UTC (rev 71720)
@@ -24,6 +24,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.util.List;
+import java.util.ArrayList;
import org.jboss.aop.Advisor;
import org.jboss.aop.AspectManager;
@@ -58,8 +59,17 @@
*/
public class AOPConstructorJoinpoint extends BasicConstructorJoinPoint
{
- AOPProxyFactory proxyFactory = new GeneratedAOPProxyFactory();
+ private static final List<ScopeLevel> levels;
+ private AOPProxyFactory proxyFactory = new GeneratedAOPProxyFactory();
+ static
+ {
+ // get all sub INSTANCE levels
+ levels = new ArrayList<ScopeLevel>(CommonLevelsUtil.getSubLevels(CommonLevels.INSTANCE));
+ // remove class joinpoint, we're only interested in instance/joinpoint_override
+ levels.remove(CommonLevels.JOINPOINT);
+ }
+
/**
* Create a new AOPConstructorJoinpoint.
*
@@ -177,10 +187,6 @@
{
if (metaData != null)
{
- // TODO - remove this after making tests work again
- // uncomment this for previous behavior
- // List<ScopeLevel> levels = Collections.singletonList(CommonLevels.INSTANCE);
- List<ScopeLevel> levels = CommonLevelsUtil.getSubLevels(CommonLevels.INSTANCE);
for (ScopeLevel level : levels)
{
if (hasMetaDataAtLevel(metaData, level))
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.xml 2008-04-04 05:21:22 UTC (rev 71719)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.xml 2008-04-04 11:34:44 UTC (rev 71720)
@@ -36,4 +36,9 @@
<value>123</value>
</property>
</bean>
+
+ <bean name="Bean7" class="org.jboss.test.microcontainer.support.JustClassAnnotatedBean"/>
+ <bean name="Bean8" class="org.jboss.test.microcontainer.support.JustMethodAnnotatedBean"/>
+ <bean name="Bean9" class="org.jboss.test.microcontainer.support.AnnotatedBean"/>
+
</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustClassAnnotatedBean.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustClassAnnotatedBean.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustClassAnnotatedBean.java 2008-04-04 11:34:44 UTC (rev 71720)
@@ -0,0 +1,33 @@
+/*
+* 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.microcontainer.support;
+
+/**
+ * Just class annotation.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Test
+public class JustClassAnnotatedBean
+{
+ public void method() {}
+}
\ No newline at end of file
Copied: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustMethodAnnotatedBean.java (from rev 71719, projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/AnnotatedBean.java)
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustMethodAnnotatedBean.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/support/JustMethodAnnotatedBean.java 2008-04-04 11:34:44 UTC (rev 71720)
@@ -0,0 +1,33 @@
+/*
+* 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.microcontainer.support;
+
+/**
+ * Just method annotation.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class JustMethodAnnotatedBean
+{
+ @Test
+ public void method() {}
+}
\ No newline at end of file
Modified: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.java 2008-04-04 05:21:22 UTC (rev 71719)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/HasInstanceAnnotationTestCase.java 2008-04-04 11:34:44 UTC (rev 71720)
@@ -51,5 +51,9 @@
assertIsAspectized("Bean5");
assertIsAspectized("Bean6");
+
+ assertIsPojo("Bean7");
+ assertIsPojo("Bean8");
+ assertIsPojo("Bean9");
}
}
More information about the jboss-cvs-commits
mailing list