[ https://issues.apache.org/jira/browse/SLING-5029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konrad Windszus resolved SLING-5029. ------------------------------------ Resolution: Fixed Fix Version/s: Sling Models Impl 1.2.6 Sling Models API 1.2.4 Fixed in [r1723767|http://svn.apache.org/r1723767] Also clarified the javadoc and method signature of {{ModelFactory.canCreateFromAdaptable}} to no longer throw any exception but to just return {{false}} in case e.g. the model annotation is missing or the according adapter factory is not there for any reason in addition to returning {{false}} if the given model can just not be adapted from the given adaptable. > ModelFactory.canCreateFromAdaptable can report false positives > -------------------------------------------------------------- > > Key: SLING-5029 > URL: https://issues.apache.org/jira/browse/SLING-5029 > Project: Sling > Issue Type: Bug > Components: Extensions > Affects Versions: Sling Models Impl 1.2.2 > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Minor > Labels: models > Fix For: Sling Models API 1.2.4, Sling Models Impl 1.2.6 > > > As being mentioned by [~sseif...@pro-vision.de] in > https://issues.apache.org/jira/browse/SLING-4997?focusedCommentId=14734059&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14734059 > the method {{ModelFactory.canCreateFromAdaptable}} may return false > positives in case the class has a model annotation but is still not > registered due to last line in > {{ModelFactory.getImplementationTypeForAdapterType(...)}}. > In the best case an exception should be thrown if the class has a Model > annotation but is still not registered (but probably that is not easily > possible to detect in case of different adapter classes). Therefore at least > the handling should be consistent here. -- This message was sent by Atlassian JIRA (v6.3.4#6332)