DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34886>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34886





------- Additional Comments From [EMAIL PROTECTED]  2005-05-27 10:22 -------
Can you give specific cases where this would be useful?

The question is whether "cleaning" of data should be done within this library,
or before data is fed to this library, and a good use case for why bad data
might be fed to a Converter class would be useful to have.

I can't easily think of justification for this at the moment. In most cases,
throwing an exception on bad data is safer, and this can be done for all the
converters just by ensuring the converter has no default value set.

The referenced bug makes good arguments for having struts "form beans" have only
string properties, ie struts is not a justification for this feature as far as I
can see.

Trimming whitespace does sound *reasonable* at first glance. Removing internal
whitespace or removing arbitrary non-digit characters sounds less tempting.

Note that this change would touch a fair number of Converter classes:
 * Short, ShortArray
 * Integer, IntegerArray
 * Long, LongArray, 
 * Double, DoubleArray
 * Float, FloatArray

*If* this were to be implemented, I would recommend that a "setTolerant" method
be defined on each converter class, and that the "data cleaning" behaviour only
occur if this flag were set. That would keep full backwards compatibility. Alas,
Converter is an interface not an abstract class, so we can't define the method
globally across all converters as that would break existing user-defined 
converters.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to