stefanseifert commented on a change in pull request #28:
URL:
https://github.com/apache/sling-org-apache-sling-models-impl/pull/28#discussion_r762043114
##########
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:
should this be converted to debug message? if the postconstruct returned
false, this is by intention and not something to be warned?
--
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]