]
Toshiya Kobayashi moved RHDM-1558 to DROOLS-5937:
-------------------------------------------------
Component/s: core engine
(was: BRE)
Docs QE Status: NEW
Key: DROOLS-5937 (was: RHDM-1558)
QE Status: NEW
Affects Version/s: 7.48.0.Final
(was: 7.9.0.GA)
Workflow: GIT Pull Request workflow (was: CDW with docs v1)
Environment: (was: The issue was found in RHDM 7.9.0.)
Project: Drools (was: Red Hat Decision Manager)
Compound assignment operation like BigDecimal_type_property
<op> Numeric/BigDecimal_value causes an unexpected result or error in MVEL.
---------------------------------------------------------------------------------------------------------------------------------------
Key: DROOLS-5937
URL:
https://issues.redhat.com/browse/DROOLS-5937
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.48.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
Priority: Major
Labels: support
Attachments: reproducer_02801729_6_mvel.zip, reproducer_02801729_6e_6f.zip
Compound assignment operation like BigDecimal_type_property <op>
Numeric/BigDecimal_value causes an unexpected result or error in MVEL (org.mvel2).
When using MVEL.eval method, the result of "+=" operation is incorrect, and
"-=", "*=", "/=" operations result in an error.
- BigDecimal_type_property <op> Numeric_value (Initial value of $bus.weight is
12000B)
-- $bus.weight += 1000 ==> 1000 // incorrect result
-- $bus.weight -= 1000 ==> Error
-- $bus.weight *= 1000 ==> Error
-- $bus.weight /= 1000 ==> Error
- BigDecimal_type_property <op> BigDecimal_value (Initial value of $bus.weight and
bdv are 12000B and 1000B respectively)
-- $bus.weight += bdv ==> 1000 // incorrect result
-- $bus.weight -= bdv ==> Error
-- $bus.weight *= bdv ==> Error
-- $bus.weight /= bdv ==> Error
When using MVEL.executeExpression method, the result of "+=" operation is
correct, while "-=", "*=", "/=" operations cause an error.
- BigDecimal_type_property <op> Numeric_value (Initial value of $bus.weight is
12000B)
-- $bus.weight += 1000 ==> 13000 // correct
-- $bus.weight -= 1000 ==> Error
-- $bus.weight *= 1000 ==> Error
-- $bus.weight /= 1000 ==> Error
- BigDecimal_type_property <op> BigDecimal_value (Initial value of $bus.weight and
bdv are 12000B and 1000B respectively)
-- $bus.weight += bdv ==> 13000 // correct
-- $bus.weight -= bdv ==> Error
-- $bus.weight *= bdv ==> Error
-- $bus.weight /= bdv ==> Error
$bus.weight is a BigDecimal type property.
MVEL library should return correct result for any operations above.