You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2016/12/22 12:22:58 UTC

[jira] [Closed] (SLING-6377) When adapting within a Collection preferably use ModelFactory instead of adaptTo()

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

Stefan Seifert closed SLING-6377.
---------------------------------

> When adapting within a Collection preferably use ModelFactory instead of adaptTo()
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-6377
>                 URL: https://issues.apache.org/jira/browse/SLING-6377
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Sling Models Impl 1.3.6
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>             Fix For: Sling Models Impl 1.3.8
>
>
> Currently whenever some adaptation is necessary in {{ModelAdapterFactory.adaptIfNecessary}} the {{internalCreateModel}} should be used instead of adaptTo() whenever possible. This is currently not the case for adaptations within a {{Collection}}. Using the {{ModelFactory}} approach has the advantage of exposing the real underlying exception, while {{adaptTo}} would only log in case of failures.



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