Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Sling Models Impl 1.2.0
Description
SLING-3709 introduced a new "ModelFactory" with methods for checking if adaption is possible and adapt to a model with enhanced exception support.
the current implementation does not support the "adapters" variant of models, where the model is adapted to an alternate adapter class (see documentation).
adaption of such models via adaptTo still works, but false errors are reported
ERROR org.apache.sling.models.impl.ModelAdapterFactory - Provided Adapter class does not have a Model annotation
if using the factory method ModelFactory.canCreateFromAdaptable an exception is thrown - this is wrong.
attached is a patch that extends the unit test to include calls to canCreateFromAdaptable - all fail ImplementsExtendsTest.patch
kwin: can you have a look?
Attachments
Attachments
Issue Links
- is broken by
-
SLING-3709 Sling Models: Allow caller to deal with exceptions
- Closed