[
https://issues.apache.org/jira/browse/AMQ-4428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13621998#comment-13621998
]
Christoffer Sawicki commented on AMQ-4428:
------------------------------------------
(I've found that a couple of those assertions are missing, but I've filed
another issue for that (AMQ-4433). I believe there is a problem even assuming
all assertions are in place.)
In the context of setProperty, properties/parameters can be invalid in two ways:
1. The property is missing on the target object. This situation happens a lot
during normal initialization and works fine as is.
2. The property does exist but calling the setter throws an exception. This is
the situation I believe is exceptional and should be logged. With working
assertions the property/parameter will be flagged as invalid, but the
exception—which contains information about why the property value is invalid—is
hidden from the user, making troubleshooting harder.
For reference:
https://github.com/apache/activemq/blob/trunk/activemq-client/src/main/java/org/apache/activemq/util/IntrospectionSupport.java#L160
I'll do some more research with the unit tests and get back to you.
Thanks for your time!
> Don't swallow errors in IntrospectionSupport.setProperty
> --------------------------------------------------------
>
> Key: AMQ-4428
> URL: https://issues.apache.org/jira/browse/AMQ-4428
> 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 is really evil since it can make ActiveMQ ignore invalid
> configuration completely silently. I think that errors should at least be
> logged. (Is there any case when this isn't wanted?)
--
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: http://www.atlassian.com/software/jira