You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/12/29 13:46:05 UTC

DO NOT REPLY [Bug 32875] - Unable to do validwhen comparisons of doubles.

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=32875>.
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=32875





------- Additional Comments From nminshew@gmail.com  2004-12-29 13:46 -------
Created an attachment (id=13854)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=13854&action=view)
Corrects issue when trying to compare doubles.

I have added support for comparing doubles when using validwhen.  I have tested
it and it works correctly now in my application.  I noticed that before it did
a check to see if the values from the form are of type Integer.class, but after
reviewing the code it seems that this case can never occur.  Everywhere where
the value of the property from the form is retrieved
ValidatorUtils.getValueAsString(bean, property) is used, thus the value should
always be a string.  I went ahead and left the code to check for objects of
type Integer.class and now Double.class, but if they are unneeded they could be
removed.

thanks.

-- 
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org