You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2020/09/01 12:57:03 UTC

[GitHub] [sling-org-apache-sling-scripting-sightly] raducotescu commented on pull request #8: SLING-9715 - The JavaUseProvider does not properly handle the adaptable argument for Sling Model classes

raducotescu commented on pull request #8:
URL: https://github.com/apache/sling-org-apache-sling-scripting-sightly/pull/8#issuecomment-684832256


   Applied a slightly modified patch in 960d9cd. Had to replace:
   
   ```java
   if (adaptable != null && modelFactory.canCreateFromAdaptable(adaptable, cls)) {
       LOG.debug("Trying to instantiate class {} as Sling Model from provided adaptable.", cls);
       return ProviderOutcome.notNullOrFailure(modelFactory.createModel(request, cls));
   }
   ```
   
   with
   
   ```java
   if (adaptable != null && modelFactory.canCreateFromAdaptable(adaptable, cls)) {
       LOG.debug("Trying to instantiate class {} as Sling Model from provided adaptable.", cls);
       return ProviderOutcome.notNullOrFailure(modelFactory.createModel(adaptable, cls));
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org