You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2012/10/26 15:45:14 UTC

[jira] [Commented] (SLING-2630) Cannot have multiple Adapter Factories configured to have same adapter / adaptable combination

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

Carsten Ziegeler commented on SLING-2630:
-----------------------------------------

Thanks for the patch, Will. Looks good to me, so I applied it.

And this also solves SLING-1960 :)
                
> Cannot have multiple Adapter Factories configured to have same adapter / adaptable combination
> ----------------------------------------------------------------------------------------------
>
>                 Key: SLING-2630
>                 URL: https://issues.apache.org/jira/browse/SLING-2630
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Adapter 2.0.16
>            Reporter: Will McGauley
>            Assignee: Carsten Ziegeler
>              Labels: AdapterManager
>             Fix For: Adapter 2.0.18
>
>         Attachments: SLING-2630.patch
>
>
> If you configure more than one AdapterFactory in the system which bears the same adapter / adaptable combinations only the AdapterFactory with the highest ranking is used.
> Example:
> ClassA extends MyInterface
> classB extends MyInterface
> AdapterFactoryA adapts Node to MyInterface  (hoping to return implementation ClassA under some circumstances)
> AdapterFactoryB adapts Node to MyInterface  (hoping to return implementation ClassA under some other circumstances)
> when adapting Node to MyInterface, only AdapterFactoryA is ever used, even if it returns null for a particular Node.
> Expected:  If AdapterFactoryA returns null then any remaining AdapterFactories configured with that combination (in this case AdapterFactoryB) should be allowed the chance to adapt

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira