Bug 750349 - MVEL Dialect: BigDecimal does not show the correct value
Summary: MVEL Dialect: BigDecimal does not show the correct value
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: BRMS 5.2.0.GA
Hardware: Unspecified
OS: All
unspecified
medium
Target Milestone: ER6
: BRMS 5.3.0.GA
Assignee: Mario Fusco
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-31 19:22 UTC by Alessandro Lazarotti
Modified: 2020-04-27 01:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBRULES-3275 0 Major Resolved MVEL Dialect: BigDecimal does not show the correct value 2015-11-26 01:47:21 UTC

Description Alessandro Lazarotti 2011-10-31 19:22:37 UTC
Description of problem:
MVEL does not show the correct value for BigDecimal instances

Version-Release number of selected component (if applicable):
BRMS 5.2.0.GA

How reproducible:

For a code like,
BigDecimal someNumber = 500.01B;
System.out.println(someNumber);

The "someNumber" variable does not show the correct value


Actual results:
An integer value, 500.

Expected results:
The full floating point 500.01

Additional info:
The same happens to show result of arithmetic operations btw BigDecimals:
BigDecimal test = new BigDecimal("50000");
System.out.println(test / new BigDecimal("1.13"));

The result is:
44247

... instead of 44247.78761061946902654867256637168.

Anyway, the internal representation is correct, only the method invoked to show the values is wrong.

The result for:
System.out.println( (test / new BigDecimal("1.13")) == 44247.78761061946902654867256637168B)

is true.

Comment 3 Lukáš Petrovický 2012-05-21 07:55:03 UTC
VERIFIED fixed in ER7.


Note You need to log in before you can comment on or make changes to this bug.