Tim Driven Development | Test until the fear goes away
Tim Driven Development | Test until the fear goes away
Tim Driven Development | Test until the fear goes away
Tim Cooke wrote:What is GenericPrams.QMS_ALLOWED_CHARS_NUMBERS? A regex expression I assume? What is its value?
Tim Cooke wrote:And to ask my next question ahead of time.... What are you expecting getParameter("overridepercent") to yield?
Tim Cooke wrote:And finally, what Integer value are you expecting to get out of the whole thing?
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:The statement also seems to try to sanitize data. I'm not so kind. If they cram in non-numeric characters into a numeric field, I'm going to reject the whole request. Who knows what else they messed up?
Liutauras Vilda wrote:
Try this version of formatting (note, I extracted some code to variables and inverted some logic, for better readability(?)):
Ron McLeod wrote:What is the value of overrideValue after this is executed?
Steve Dyke wrote:Sorry, I am using Java 8
Ron McLeod wrote:
overrideValue.trim().isEmpty()
Steve Dyke wrote:This does not prevent spaces either
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Don't get me started about those stupid light bulbs. |