activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Bunn (JIRA)" <>
Subject [jira] [Commented] (AMQ-4428) Don't swallow errors in IntrospectionSupport.setProperty
Date Mon, 06 May 2013 11:04:17 GMT


Erik Bunn commented on AMQ-4428:

An example of where this swallowed Throwable produced considerable headache.

An embedded Broker's timeout options were not being set as expected. The first suspect was
documentation wiki/code mismatch (FailoverTransport backoffMultiplier vs. reconnectDelayExponent),
but this wasn't the real culprit: IntrospectionSupport has a static init of a third-party
library, which had been missed by us while minimizing libraries for the embed. The IntrospectionSupport.setProperty()
catch silently swallows the informative exception.

I would second #2, above. 
Further, I would suggest catching qualified exceptions rather than Throwable, which risks
silencing possible fatal errors (OOM). 

> Don't swallow errors in IntrospectionSupport.setProperty
> --------------------------------------------------------
>                 Key: AMQ-4428
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: Christoffer Sawicki
>            Priority: Minor
>         Attachments: 0001-Log-errors-in-IntrospectionSupport.setProperty.patch
> `setProperty` currently ends with `… catch (Throwable ignore) \{ return false; \}`.
This can make troubleshooting invalid configuration much harder since the exception (that
contains detailed information) is hidden from the user.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message