[
https://issues.apache.org/jira/browse/SLING-4644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Egli closed SLING-4644.
------------------------------
> SlingException is not properly propagated by
> ResourceProviderEntry.getInternalResource(...)
> -------------------------------------------------------------------------------------------
>
> Key: SLING-4644
> URL: https://issues.apache.org/jira/browse/SLING-4644
> Project: Sling
> Issue Type: Bug
> Components: ResourceResolver
> Affects Versions: Resource Resolver 1.2.4
> Reporter: Konrad Windszus
> Assignee: Carsten Ziegeler
> Fix For: Resource Resolver 1.2.6
>
>
> Currently any exception thrown from the
> {{ResourceResolverEntry.getResourceFromProviders}}
> (https://github.com/apache/sling/blob/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java#L389),
> is caught by {{ResourceProviderEntry.getInternalResource}}
> (https://github.com/apache/sling/blob/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java#L383)
> and only logged on debug level. This leads to the case that if the
> underlying resource provider throws a {{SlingException}} during its
> {{getResource}} that exception is gonna be swallowed (and not rethrown
> properly). Only a log statement with level debug would give some explanation
> on why the getResource would fail. But according to the javadoc the
> {{ResourceResolver.getResource}} should rather throw a {{SlingException}} in
> that case.
> I would suggest to rewrite that exception handling in
> https://github.com/apache/sling/blob/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java#L383
> to properly propagate all {{SlingException}}s.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)