[seam-issues] [JBoss JIRA] (SOLDER-326) org.jboss.solder.exception.control.ExceptionHandledInterceptor swallows unhandled unchecked exceptions
Ivo Maixner (JIRA)
jira-events at lists.jboss.org
Tue Apr 17 05:08:17 EDT 2012
Ivo Maixner created SOLDER-326:
----------------------------------
Summary: org.jboss.solder.exception.control.ExceptionHandledInterceptor swallows unhandled unchecked exceptions
Key: SOLDER-326
URL: https://issues.jboss.org/browse/SOLDER-326
Project: Solder
Issue Type: Bug
Components: Exception Handling
Affects Versions: 3.1.0.Final
Reporter: Ivo Maixner
If an unchecked exception is unhandled, it is not wrapped in ObserverException when exiting from bm.fireEvent().
Therefore, the following code in the ExceptionHandledInterceptor.passExceptionsToSolderCatch() method:
try {
bm.fireEvent(new ExceptionToCatch(e));
} catch (Exception ex) {
if (ex.getClass().equals(ObserverException.class)) {
... re-throw wrapped exception ...
}
}
swallows such exceptions.
As for org.jboss.solder.exception.control.test.common.interceptor.ExceptionHandledInterceptorTest, there is the testExceptionRethrownWhenNoExceptionHandlerAvailable() test which only deals with checked exceptions. A new test for unchecked exceptions should be added.
(Btw, the related test class Ping has 2 methods: ping() throwing a CheckedException and pong() throwing ClassNotFoundException - which is a checked exception as well incidentally.)
(I am using solder-impl-3.1.1.Final, which is not recognized by the ticketing system...)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list