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

Konrad Windszus updated SLING-6377:
-----------------------------------
    Description: 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.  (was: 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}}.)

> 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.4
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>
> 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)

Reply via email to