You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/06/06 16:52:02 UTC

[jira] [Commented] (TAP5-1305) Service decorations can fail if using the conventional naming

    [ https://issues.apache.org/jira/browse/TAP5-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019896#comment-14019896 ] 

ASF subversion and git services commented on TAP5-1305:
-------------------------------------------------------

Commit 63ad93a7dc1cdac66c81a43cbd5a21723d54a93b in tapestry-5's branch refs/heads/master from [~thiagohp]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=63ad93a ]

Resolves two tickets by refusing to have two different decorator methods with the same in different classes and suggesting a solution.
TAP5-2012: Make multiple same name service decoration methods error message better
TAP5-1305 Service decorations can fail if using the conventional naming


> Service decorations can fail if using the conventional naming
> -------------------------------------------------------------
>
>                 Key: TAP5-1305
>                 URL: https://issues.apache.org/jira/browse/TAP5-1305
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.1.0.4
>            Reporter: Dan Adams
>            Assignee: Thiago H. de Paula Figueiredo
>              Labels: month-of-tapestry
>
> If you have a service FooBar and 2 modules that each have:
> public static FooBar decorateFooBar(FooBar delegate, ...)
> you will get a logging message like this:
> [WARN] com.example.services.BazModule.FooBar Could not add object with duplicate id 'FooBar'.  The duplicate object has been ignored.
> which results in one of the contributions (you don't know which one) being dropped. This is because T5 uses an ordered contribution internally when collecting the contributions and bases the id of the contribution based on the method name (drops "decorate").
> It should either fail with an exception and a good error or support this behaviour. The problematic line is RegistryImpl.findDecoratorsForService (line 634).
> The work-around is to use @Match("FooBar") on the method and name it something different such as "decoratingWithMyThingy".



--
This message was sent by Atlassian JIRA
(v6.2#6252)