[
https://issues.apache.org/jira/browse/SLING-4337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14292025#comment-14292025
]
Felix Meschberger edited comment on SLING-4337 at 1/26/15 4:27 PM:
-------------------------------------------------------------------
Thanks for providing the patch. I have applied it in Rev. 1654840 with a slight
modification:
One slight modification, though: I made the three fields of ProviderOutcome
final and add the cause to the private constructor. Also renamed the field t to
cause and the method to getCause -- along the lines of how Throwable does it.
Also added and adapted some JavaDoc
was (Author: fmeschbe):
Thanks for providing the patch. I have applied it in Rev. with a slight
modification:
One slight modification, though: I made the three fields of ProviderOutcome
final and add the cause to the private constructor. Also renamed the field t to
cause and the method to getCause -- along the lines of how Throwable does it.
Also added and adapted some JavaDoc
> Sightly should only log errors from use providers if none of the use
> providers succeeded
> ----------------------------------------------------------------------------------------
>
> Key: SLING-4337
> URL: https://issues.apache.org/jira/browse/SLING-4337
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Reporter: Justin Edelson
> Assignee: Felix Meschberger
> Fix For: Scripting Sightly Engine 1.0.0
>
> Attachments: SLING-4337.patch
>
>
> While iterating through the use providers, it is possible that one with fail
> and a later one will succeed. In this case, it doesn't make sense to log the
> failure from the first case. However, this is exactly what happens now with
> the PojoUseProvider which logs an error if a class can't be instantiated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)