Hi folks,

i’ve taken a look to our 'default‘ converters and the behavior of conversion 
errors and default values is not the same.

javadoc of the interface
/**
 * Convert the given configuration keys from it's String representation into 
the required target type.
 *
 * @param value the configuration value
 * @return the converted value
 */
our BooleanConverter returns Boolean.FALSE as default value.
our IntegerConverter calls Integer.decode() and throws a NumberFormatException 
if the string can’t be parsed.

imo if the converter can’t handle the input, the converter should return null.

My understanding is, that i can have n converters for a type and they try to 
convert the value in a chain ordered by @Priority until one of them returns a 
converted value (not null).

if no converter can handle the value, we should throw a Conversion- or 
ConfigException

WDYT?

lg 
reini

Reply via email to