DO NOT REPLY [Bug 34886] - [beanutils] Make long converter more resistant to extra white-spaces

2005-06-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2005-06-08 08:36 ---
There's been no response on this from the original requester, and the general
consensus is that registering a custom a custom converter or validating before
using ConvertUtils is the right solution. So I'm closing this.

-- 
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]



DO NOT REPLY [Bug 34886] - [beanutils] Make long converter more resistant to extra white-spaces

2005-05-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Target Milestone|--- |2.0 milestone 1




--- Additional Comments From [EMAIL PROTECTED]  2005-05-27 16:28 ---
I'm -1 to doing this and think we should close this as "WONTFIX", for the same 
reason I gave in Bug 33630

"If you're not happy with how the default BeanUtils converters are handling 
this situation, then you can always register your own custom converters with 
the behaviour you desire."

-- 
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]



DO NOT REPLY [Bug 34886] - [beanutils] Make long converter more resistant to extra white-spaces

2005-05-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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 11:05 ---
Sorry, that's not what I meant by a use-case. What I meant was an explanation of
what kind of application would be feeding raw user data straight into a very
low-level library like beanutils.

Struts would be one such usecase - user data entered into an HTML form is mapped
to a bean on the webserver for further processing. Only it's not a usecase
because the recommended approach is to declare all fields on the "form bean" as
strings and then apply the validator library to the fields. Only once validation
has been run should the data be mapped to real data.

So what applications out there are feeding raw data into beanutils, and why
can't they validate first like struts-based apps do? (I presume validator also
does transformation like removing thousands-separators and normalising decimal
separators; does it?).

Again, please note that beanutils is a *low-level* library. As such, it needs to
put the emphasis on reliability and maintainability over features. That doesn't
mean it can't provide *any* features to its users, but the more code in
beanutils, the more bugs there will be. And the harder it will be to fix them.
And that's not good in a library that many other apps depend upon to provide
core functionality. So every feature added has to go through a "cost/benefit
analysis", and in particular a thorough justification for why that functionality
can't be implemented reasonably at a higher level (eg by using a validator
library as struts does).

Sorry to be so tough on your proposal, but adding to beanutils is not like
requesting a new feature in end-user program X. Someone needs to really show the
feature is necessary - and unfortunately I can't see that at the moment.
Handling bad user data - yes, that's useful - but why is it best done in 
beanutils?


-- 
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]



DO NOT REPLY [Bug 34886] - [beanutils] Make long converter more resistant to extra white-spaces

2005-05-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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:49 ---
All agreed.

As for the use-case: more and more, people receive electronically numbers they
have to enter and when copying with the mouse, they increasingly catch extra
characters inserted for readability.

I guess the "setTolerant" should not be boolean, but multi-level

- 0: none 
- 1: low (--> trim) 
- 2: medium (-->remove internal delims) 
- 3: high even remove surrounding double quotes

-- 
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]



DO NOT REPLY [Bug 34886] - [beanutils] Make long converter more resistant to extra white-spaces

2005-05-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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]



DO NOT REPLY [Bug 34886] - [beanutils] Make long converter more resistant to extra white-spaces

2005-05-12 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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


[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|make long converter more|[beanutils] Make long
   |resistant to extra white-   |converter more resistant to
   |spaces  |extra white-spaces




-- 
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]