To be honest I don't need it at the moment, but I think it's reasonable
to return null on conversion.
Converter (line 167) does it:
public Object convert(Object value, Class c)
{
// Null is always converted to null
if (value == null)
{
return null;
yeah but that is not a problembecause that return null will never be hit because the value is not null It only happens when the value is not null and the converted value is suddenly null which is maybe possible but a bit strange.
johanOn 3/8/06, Sven Meier [EMAIL PROTECTED] wrote:
To be honest I
Is there a reason why a converter is not allowed to return null?
See PropertyResolver (line 821):
Object converted = converter.convert(value, getMethod.getReturnType());
if (converted == null value != null)
{
throw new ConversionException(Can't convert value: + value + to class:
+
so you have a case where the value is something but the converter converts it to null?This is more or less a check if conversion did happen.But i can remove it and let conversion exceptions be thrown inside the converter
johanOn 3/7/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Is there a reason