atom feed4 messages in org.apache.wicket.devRe: Design of StringValue toOptionalX...
FromSent OnAttachments
Martin GrigorovJan 30, 2012 4:35 am 
Sven MeierJan 30, 2012 4:41 am 
Igor VaynbergJan 30, 2012 8:11 am 
Peter ErtlJan 30, 2012 12:02 pm 
Subject:Re: Design of StringValue toOptionalXYZ() and toXYZ(defaultValue)
From:Sven Meier (sv@meiers.net)
Date:Jan 30, 2012 4:41:45 am
List:org.apache.wicket.dev

I don't know the reason for this. Let's change it for 1.5.x too.

Sven

Am 30.01.2012 13:35, schrieb Martin Grigorov:

Hi devs,

At https://issues.apache.org/jira/browse/WICKET-4356 the reporter asks a reasonable question: why toXyz(default) throws a FormatException instead of returning the default value ? I agree with him. Is there a reason for the current behavior - the default value is used only if the text is null or empty but if non-empty and with the wrong format then the methods throw exception instead of logging it (DEBUG) and returning the default value.

If you also agree then the next question is: should we change this behavior in 1.5.x or just in 6.0?