[weld-commits] Weld SVN: r5700 - cdi-tck/branches/1.0/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:07:49 EST 2010


Author: pete.muir at jboss.org
Date: 2010-02-01 15:07:49 -0500 (Mon, 01 Feb 2010)
New Revision: 5700

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

Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java	2010-02-01 19:53:25 UTC (rev 5699)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java	2010-02-01 20:07:49 UTC (rev 5700)
@@ -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/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooDecorator.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooDecorator.java	2010-02-01 19:53:25 UTC (rev 5699)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooDecorator.java	2010-02-01 20:07:49 UTC (rev 5700)
@@ -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();
    }

Copied: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java (from rev 5696, cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/Foo.java)
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java	                        (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/FooImpl.java	2010-02-01 20:07:49 UTC (rev 5700)
@@ -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() {}
+}

Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/InterceptorCalledBeforeDecoratorTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/InterceptorCalledBeforeDecoratorTest.java	2010-02-01 19:53:25 UTC (rev 5699)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/InterceptorCalledBeforeDecoratorTest.java	2010-02-01 20:07:49 UTC (rev 5700)
@@ -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/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java	2010-02-01 19:53:25 UTC (rev 5699)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/TransactionInterceptor.java	2010-02-01 20:07:49 UTC (rev 5700)
@@ -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