I'd like to be able to have optional values in a BeanEditForm linked
bean represented as null, e.g. if they are of type Integer.
I get the exception below.
Should 'null' just coerce straight to null, unless it is trying to go
to a primitive type?
In TypeCoercerImpl, perhaps:
// Treat null as void in terms of locating a coercion.
Class sourceType = input != null ? input.getClass() :
void.class;
Should be: (untested)
if (input == null)
{
if (targetType.isPrimitive())
{
throw ...
}
else
{
return null;
}
}
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]