Feature Requests item #1519128, was opened at 2006-07-08 08:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1519128&group_id=119783
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: core Group: 1.2 Status: Open Priority: 5 Submitted By: Sven Meier (svenmeier) Assigned to: Nobody/Anonymous (nobody) Summary: AbstractConverter handling trailing whitespace Initial Comment: AbstractConverter currently rejects values, that are not completely parsed by the given format: final ParsePosition position = new ParsePosition(0); final String stringValue = value.toString(); final Object result = format.parseObject(stringValue, position); if (position.getIndex() != stringValue.length()) { throw newConversionException(...} } This is good for cases like '08.07.2006garbage'. Since DateFormat happily parses '08.07.2006' (ignoring the trailing garbage), Wicket converters have to do this additional check. But in case of trailing whitespace, e.g. '08.07.2006 ', AbstractConverter will bark too :(. This is not what most users would expect. (Leading whitespace doesn't interest AbstractConverter because a Format will just silently swallow it.) Thus I propose to add a trim(), so both cases are taken care of. See attached diff. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1519128&group_id=119783 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop