Author: hlship
Date: Sat Oct 13 14:40:56 2007
New Revision: 584457
URL: http://svn.apache.org/viewvc?rev=584457&view=rev
Log:
TAPESTRY-1824: Code example on Alias page of tapestry-core guide is wrong, has
extra "new"
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/alias.apt
Modified: tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/alias.apt
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/alias.apt?rev=584457&r1=584456&r2=584457&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/alias.apt
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/alias.apt Sat Oct
13 14:40:56 2007
@@ -34,7 +34,7 @@
public static void contributeAlias(@InjectService("MyService") MyService
myService,
Configuration<AliasContribution> configuration)
{
- configuration.add(new AliasContribution.create(MyService.class,
myService));
+ configuration.add(AliasContribution.create(MyService.class, myService));
}
+---+
@@ -43,7 +43,8 @@
A contribution is made providing the service type.
Notice that the contribution doesn't <have> to be a service; you can just
instantiate an object inside the
- contribution method and contribute that.
+ contribution method and contribute that. That's what we're doing in the
example, though we're using a create() static
+ method rather than <<new>> (just to smooth out some Java Generics ugliness).
Contributing to AliasOverrides