You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/07/27 10:10:05 UTC

[jira] [Closed] (TAP5-1954) ObjectLocator will return wrong service implementation delegate when using markers alone

     [ https://issues.apache.org/jira/browse/TAP5-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Kemnade closed TAP5-1954.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 5.4

Thanks for checking, [~fscheffer].

> ObjectLocator will return wrong service implementation delegate when using markers alone
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-1954
>                 URL: https://issues.apache.org/jira/browse/TAP5-1954
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.3.3
>            Reporter: Carsten Klein
>             Fix For: 5.4
>
>
> Having the following services bound using the specified markers
> binder.bind(IServiceOne.class, ServiceOneImpl.class).withMarker(ServiceOneMarker.class);
> binder.bind(IServiceOne.class, ServiceOneSecondImpl.class).withMarker(ServiceOneSecondMarker.class);
> will cause the ObjectLocator service to return the wrong implementation class when doing this
> objectLocator.getService(IServiceOne.class, ServiceOneSecondMarker.class);
> This will return an instance of ServiceOneImpl instead of ServiceOneSecondImpl, although the marker ServiceOneSecondMarker was never registered with the ServiceOneImpl class.
> As a workaround, one must use withId(...) when binding the service interface implementation classes. In that case, the object locator will return the correct implementation class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)