You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/12/15 08:39:00 UTC

[jira] [Resolved] (SLING-11732) Add method ModelFactory.createModelFromWrappedRequest(...)

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

Konrad Windszus resolved SLING-11732.
-------------------------------------
    Resolution: Fixed

Fixed in https://github.com/apache/sling-org-apache-sling-models-impl/commit/769fb382d445776d44c25b92d10f6b8d564bf963 and https://github.com/apache/sling-org-apache-sling-models-api/commit/4ce6485b52da55ae3d161941a8495d3fa19a8ee1

> Add method ModelFactory.createModelFromWrappedRequest(...)
> ----------------------------------------------------------
>
>                 Key: SLING-11732
>                 URL: https://issues.apache.org/jira/browse/SLING-11732
>             Project: Sling
>          Issue Type: Improvement
>          Components: Sling Models
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>             Fix For: Models API 1.4.4, Models Implementation 1.5.6
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Similar to {{ModelFactory.getModelFromWrappedRequest(...)}} there should be a {{ModelFactory.createModelFromWrappedRequest(...)}}. The former relies on the {{adaptTo(...)}} pattern which does not emit any useful exception but just returns {{null}} in case of errors. The {{createModelFromWrappedRequest(...)}} should use the {{createModel(...)}} method internally and propagate any exceptions thrown from it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)