Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5029

ModelFactory.canCreateFromAdaptable can report false positives

    XMLWordPrintableJSON

Details

    Description

      As being mentioned by sseifert@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.

      Attachments

        Activity

          People

            kwin Konrad Windszus
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: