[weld-commits] Weld SVN: r5702 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Mon Feb 1 15:43:11 EST 2010


Author: pete.muir at jboss.org
Date: 2010-02-01 15:43:10 -0500 (Mon, 01 Feb 2010)
New Revision: 5702

Added:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java
Modified:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooDecorator.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/InterceptorCalledBeforeDecoratorTest.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java
Log:
CDITCK-99

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java	2010-02-01 20:30:29 UTC (rev 5701)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java	2010-02-01 20:43:10 UTC (rev 5702)
@@ -1,28 +1,8 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,  
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package org.jboss.jsr299.tck.tests.interceptors.definition.interceptorCalledBeforeDecorator;
 
-import javax.interceptor.Interceptors;
-
- at Interceptors(TransactionInterceptor.class)
-class Foo
+interface Foo
 {
-   public static boolean interceptorCalledFirst;
-   public static boolean decoratorCalledFirst;
-   
-   public void bar() {}
-}
+
+   public abstract void bar();
+
+}
\ No newline at end of file

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooDecorator.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooDecorator.java	2010-02-01 20:30:29 UTC (rev 5701)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooDecorator.java	2010-02-01 20:43:10 UTC (rev 5702)
@@ -21,13 +21,13 @@
 import javax.inject.Inject;
 
 @Decorator
-class FooDecorator
+class FooDecorator implements Foo
 {
    @Inject @Delegate Foo delegate;
    
    public void bar()
    {
-      if (!Foo.interceptorCalledFirst) Foo.decoratorCalledFirst = true;
+      if (!FooImpl.interceptorCalledFirst) FooImpl.decoratorCalledFirst = true;
       
       delegate.bar();
    }

Added: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java	2010-02-01 20:43:10 UTC (rev 5702)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.interceptorCalledBeforeDecorator;
+
+import javax.interceptor.Interceptors;
+
+ at Interceptors(TransactionInterceptor.class)
+class FooImpl implements Foo
+{
+   public static boolean interceptorCalledFirst;
+   public static boolean decoratorCalledFirst;
+   
+   public void bar() {}
+}


Property changes on: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/InterceptorCalledBeforeDecoratorTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/InterceptorCalledBeforeDecoratorTest.java	2010-02-01 20:30:29 UTC (rev 5701)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/InterceptorCalledBeforeDecoratorTest.java	2010-02-01 20:43:10 UTC (rev 5702)
@@ -32,13 +32,13 @@
    @SpecAssertion(section = "9.4", id = "g")
    public void testInterceptorCalledBeforeDecorator()
    {
-      Foo.interceptorCalledFirst = false;
-      Foo.decoratorCalledFirst = false;
+      FooImpl.interceptorCalledFirst = false;
+      FooImpl.decoratorCalledFirst = false;
       
       Foo foo = getInstanceByType(Foo.class);
       foo.bar();
       
-      assert Foo.interceptorCalledFirst;
-      assert !Foo.decoratorCalledFirst;
+      assert FooImpl.interceptorCalledFirst;
+      assert !FooImpl.decoratorCalledFirst;
    }
 }

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	2010-02-01 20:30:29 UTC (rev 5701)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java	2010-02-01 20:43:10 UTC (rev 5702)
@@ -23,7 +23,7 @@
 {
    @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx) throws Exception
    {
-      if (!Foo.decoratorCalledFirst) Foo.interceptorCalledFirst = true;
+      if (!FooImpl.decoratorCalledFirst) FooImpl.interceptorCalledFirst = true;
       
       return ctx.proceed();
    }



More information about the weld-commits mailing list