[jboss-jira] [JBoss JIRA] (JBRULES-3275) MVEL Dialect: BigDecimal does not show the correct value
RH Bugzilla Integration (JIRA)
jira-events at lists.jboss.org
Fri Feb 3 09:54:50 EST 2012
[ https://issues.jboss.org/browse/JBRULES-3275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664051#comment-12664051 ]
RH Bugzilla Integration commented on JBRULES-3275:
--------------------------------------------------
Mario Fusco <mfusco at redhat.com> changed the Status of [bug 750349|https://bugzilla.redhat.com/show_bug.cgi?id=750349] from ASSIGNED to MODIFIED
> MVEL Dialect: BigDecimal does not show the correct value
> --------------------------------------------------------
>
> Key: JBRULES-3275
> URL: https://issues.jboss.org/browse/JBRULES-3275
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core
> Affects Versions: 5.2.0.Final, 5.3.0.Final
> Environment: Fedora 15, JDK Oracle 1.6
> Reporter: Alessandro Lazarotti
> Assignee: Mario Fusco
> Labels: mvel
> Fix For: 5.4.0.Beta2
>
>
> MVEL Jira related: http://jira.codehaus.org/browse/MVEL-262
> MVEL does not show the correct value for BigDecimal instances, like:
> BigDecimal ale = 500.01B;
> System.out.println(ale);
> The result is: 500
> BigDecimal should invoke toString, like any Java instance to show values of variables instead of .intValue().
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list