[
https://issues.apache.org/jira/browse/MYFACES-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558318#action_12558318
]
Bernhard Huemer commented on MYFACES-1802:
------------------------------------------
Well, not every single call to getCause() is illegal as most of the time it's
either a FacesException or an EvaluationException being asked for its cause.
However, it wouldn't be advisable to remove all calls to Throwable.getCause()
as I think we have to leverage builtin exception chaining in order to provide
more meaningful error messages but only if MyFaces is running in the
appropriate environment (i.e. the version of the Java VM is at least 1.4). I've
already seen code that uses reflection to check for the existence of for
example initCause() to determine whether it's safe to call getCause(), but I'd
rather parse the java.version system property (just as for example Spring does).
> FacesException and nested exceptions
> ------------------------------------
>
> Key: MYFACES-1802
> URL: https://issues.apache.org/jira/browse/MYFACES-1802
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-127
> Affects Versions: 1.1.5
> Reporter: Bernhard Huemer
> Attachments: MyFaces-1802.patch
>
>
> The JSF 1.1 specification requires any implementation to support Java 1.3 and
> that's why the FacesException isn't allowed to utilize builtin exception
> chaining mechanisms (i.e. initCause(), etc..) as they have been introduced in
> Java 1.4. However, the FacesException retains it's cause by delegating to the
> parent's constructor (for example, "super(cause);" or "super(message,
> cause);").
> Although this bug is rather easy to fix, I've assigned the priority level
> 'Major' as it breaks the specification.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.