Bug 750349 - MVEL Dialect: BigDecimal does not show the correct value
Summary: MVEL Dialect: BigDecimal does not show the correct value
Keywords:
Status: CLOSED UPSTREAM
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:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-31 19:22 UTC by Alessandro Lazarotti
Modified: 2025-02-10 03:14 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:14:21 UTC
Type: ---
Embargoed:


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.

Comment 5 Red Hat Bugzilla 2025-02-10 03:14:21 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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