Red Hat Bugzilla – Bug 749315
config editor: INTEGER props can be set to values greater than Integer.MAX_VALUE or less than Integer.MIN_VALUE
Last modified: 2013-09-04 03:48:54 EDT
The client-side field validation should not allow values outside of the valid range for Java Integers.
We need to write our own Integer validator that validates the range, since SmartGWT's IsIntegerValidator, which is what we currently use, apparently does not. IsIntegerValidator also has the broken feature of automatically converting the value to scientific notation if it exceeds 100000000000000000000. For example , it auto-converts to "1000000000000000000000" to "1e+21". This seems fine at first, but it then proceeds to flag the value as invalid since it "Must be a whole number." So it essentially sets the field's value to something it considers invalid.
Unassigning from ips since he's not looking at this currently.
Updated the code to always set max and min values for integer validators to corresponding integer limits when they are not specified other config properties.
This prevents users from entering values outside of integer range and also avoids the automatic conversion to scientific notation since the limits are smaller then length at which automatic conversion occurs.
There was no need to create/use a custom validator.
Commit to master branch:
Bulk closing of some old issues