[weld-commits] Weld SVN: r4025 - in cdi-tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator and 1 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Oct 14 01:37:42 EDT 2009


Author: marius.bogoevici
Date: 2009-10-14 01:37:42 -0400 (Wed, 14 Oct 2009)
New Revision: 4025

Modified:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/MissileInterceptor.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java
   cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/dependent/beans.xml
Log:
Corrections to make the tests compliant with the specification (i.e. @Interceptor-annotated beans *must* specify bindings, interceptors must be declared, etc). Enabling tests.

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java	2009-10-14 03:28:06 UTC (rev 4024)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java	2009-10-14 05:37:42 UTC (rev 4025)
@@ -411,7 +411,7 @@
       AccountTransaction trans = bean.create(ctx);
       trans.execute();
       
-      assert TransactionalInterceptor.intercepted = true;
+      assert TransactionalInterceptor.intercepted;
       
       bean.destroy(trans, ctx);
       

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/MissileInterceptor.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/MissileInterceptor.java	2009-10-14 03:28:06 UTC (rev 4024)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/MissileInterceptor.java	2009-10-14 05:37:42 UTC (rev 4025)
@@ -2,10 +2,11 @@
 
 import javax.interceptor.Interceptor;
 import javax.interceptor.InvocationContext;
+import javax.interceptor.AroundInvoke;
 
- at Interceptor
 class MissileInterceptor
 {
+   @AroundInvoke
    public Object intercept(InvocationContext context) throws Exception
    {
       return context.proceed();

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java	2009-10-14 03:28:06 UTC (rev 4024)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java	2009-10-14 05:37:42 UTC (rev 4025)
@@ -4,7 +4,6 @@
 import javax.interceptor.Interceptor;
 import javax.interceptor.InvocationContext;
 
- at Interceptor
 public class TransactionInterceptor
 {
    @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx) throws Exception

Modified: cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/dependent/beans.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/dependent/beans.xml	2009-10-14 03:28:06 UTC (rev 4024)
+++ cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/dependent/beans.xml	2009-10-14 05:37:42 UTC (rev 4025)
@@ -1,6 +1,8 @@
 <beans> 
    <decorators>
-      <decorator>org.jboss.jsr299.tck.tests.context.dependent.InteriorDecorator</decorator>
+      <class>org.jboss.jsr299.tck.tests.context.dependent.InteriorDecorator</class>
    </decorators>
-
+   <interceptors>
+      <class>org.jboss.jsr299.tck.tests.context.dependent.TransactionalInterceptor</class>
+   </interceptors>
 </beans>



More information about the weld-commits mailing list