You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by dr...@apache.org on 2010/11/04 21:46:57 UTC

svn commit: r1031229 - in /tapestry/tapestry5/trunk/tapestry-ioc/src: main/java/org/apache/tapestry5/ioc/annotations/Decorate.java test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule.java

Author: drobiazko
Date: Thu Nov  4 20:46:57 2010
New Revision: 1031229

URL: http://svn.apache.org/viewvc?rev=1031229&view=rev
Log:
TAP5-1334: Id attribute of the @Decorate annotation should be optional

Modified:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/Decorate.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule.java

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/Decorate.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/Decorate.java?rev=1031229&r1=1031228&r2=1031229&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/Decorate.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/Decorate.java Thu Nov  4 20:46:57 2010
@@ -41,5 +41,5 @@ public @interface Decorate
     /**
      * Id of the decorator.
      */
-    String id();
+    String id() default "";
 }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule.java?rev=1031229&r1=1031228&r2=1031229&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule.java Thu Nov  4 20:46:57 2010
@@ -30,7 +30,7 @@ import org.apache.tapestry5.ioc.services
 public class DecorateByMarkerModule
 {
    
-    @Decorate(serviceInterface=Greeter.class, id="foo")
+    @Decorate(serviceInterface=Greeter.class)
     @GreenMarker
     public static <T> T greeter(ServiceResources resources, T delegate, AspectDecorator aspectDecorator)
     {
@@ -39,7 +39,7 @@ public class DecorateByMarkerModule
    
     @Decorate(serviceInterface=Greeter.class, id="bar")
     @GreenMarker
-    @Order("after:foo")
+    @Order("after:Greeter")
     public static <T> T greeter2(ServiceResources resources, T delegate, AspectDecorator aspectDecorator)
     {
         return doDecorate("bar", resources, delegate, aspectDecorator);
@@ -47,7 +47,7 @@ public class DecorateByMarkerModule
    
     @Decorate(serviceInterface=Greeter.class, id="baz")
     @GreenMarker
-    @Order({"after:foo", "before:bar"})
+    @Order({"after:Greeter", "before:bar"})
     public static <T> T greeter3(ServiceResources resources, T delegate, AspectDecorator aspectDecorator)
     {
         return doDecorate("baz", resources, delegate, aspectDecorator);