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

Bug 363954

Summary: RUI - MVC does not validate scale or precision for decimal model variable
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hjiyong, jeffdouglas, jinfahua, jspadea
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test program none

Description Paul Hoffman CLA 2011-11-16 13:57:36 EST
Created attachment 207110 [details]
Test program

Model variable decimalNumber is declared as decimal(6,2).

MVC does no validation or truncation on input number but assigns it as is to the variable.

Sample test is enclosed.   After starting test, type in a large number like 1234568.48823 in the decimal field view and press validate button.

The input will be accepted and saved in the decimalNumber model variable.

An assignment of the number as a literal would throw an exception because the number would not fit.

Assignment of 1234.56789 would fit but would be rounded or truncated.

This would be major for an app going into production, but may be OK for 7.0 release.
Comment 1 Justin Spadea CLA 2011-11-17 12:08:59 EST
Fixed InternalFormattingUtil.js - in EDT the function is given a boxed value so it must first be unboxed.

There is still the problem where extra decimals are not truncated. That is a riskier change and I've opened bug 364064 to track it for a future release.
Comment 2 Paul Hoffman CLA 2012-03-30 16:35:10 EDT
Verified by Justin in associated fix