kwin commented on a change in pull request #28:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/28#discussion_r762049979



##########
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##########
@@ -265,7 +265,11 @@ private void clearDisposalCallbackRegistryQueue() {
     public <AdapterType> AdapterType getAdapter(Object adaptable, 
Class<AdapterType> type) {
         Result<AdapterType> result = internalCreateModel(adaptable, type);
         if (!result.wasSuccessful()) {
-            log.warn("Could not adapt to model", result.getThrowable());
+            if (result == Result.POST_CONSTRUCT_PREVENTED_MODEL_CONSTRUCTION) {
+                log.warn("Could not adapt to model as PostConstruct method 
returned false"); // do no construct runtime exception in this case

Review comment:
       good point, lowered the level to debug in 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/28/commits/e3afef7b4b175a01ebbf7f7c5bcf0b8607c541bc.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to