Description
Hi,
I found an issue in ConfigurationHelper.getIntProperty()
If there is a String propery but not a numeric value it lead to NumberFormatException.
My expectation in this case is to be returned a default value instead of exception.
The code is
if (prop instanceof String) { return Integer.valueOf((String) prop); } else ...
Fix proposal :
if (prop instanceof String) { try { return Integer.valueOf((String)prop); } catch (NumberFormatException e) { ActiveMQClientLogger.LOGGER.propertyNotInteger(propName, prop.getClass().getName()); return def; } } else ...
Same case is in getLongProperty()