Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319938

Summary: DecimalTextRidget - wrong range validation result with null value
Product: [RT] Riena Reporter: Elias Volanakis <elias>
Component: ridgetAssignee: Elias Volanakis <elias>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.campo
Version: unspecified   
Target Milestone: 3.0.0.M2   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Elias Volanakis CLA 2010-07-14 23:27:23 EDT
To reproduce: 

1. use a DecimalTextRidget that is bound to a new DoubleBean(null)
2. add a ValidRange(0.0, 10.0) or ValidRangeAllowEmpty(5.0, 10.0) rule with ValidationTime.UPDATE_ON_MODEL. Both rules accept null (null equiv. zero equiv. empty). 
3. invoke ridget.updateFromModel()

Result: the error marker is set
Excpected: the error marker should not be set.

---

The cause is that DecimalTextRidget overrides getText() to perform some formatting on the internal string. This is missed when manually verifiying the value in updateFromModel() since it accesses the value directly.
Comment 1 Elias Volanakis CLA 2010-07-14 23:27:43 EDT
Fixed in HEAD.