]
Mario Fusco updated DROOLS-5926:
--------------------------------
Sprint: 2020 Week 52-03 (from Dec 21)
Executable Model compiler interprets numeric strings with leading 0
as Octal values
-----------------------------------------------------------------------------------
Key: DROOLS-5926
URL:
https://issues.redhat.com/browse/DROOLS-5926
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.47.0.Final
Reporter: Matteo Casalino
Assignee: Mario Fusco
Priority: Major
Attachments: integer-string-interpreted-as-octal-value-with-exec-model.zip
The Executable Model compiler interprets numeric strings with leading 0 as Octal values.
This behaviour breaks compatibility with the MVEL compiler, which interprets them as
decimal.
For example the following rule will fail to compile with Executable Model, because 800 is
not a valid octal value:
{noformat}
rule "Test"
when
Fact(x == "0800")
then
end
{noformat}
The following error is given at compilation time:
{noformat}
Error Messages:
Message [id=1, level=ERROR,
path=src/main/java/org/build/example/rules/Rules3F1F75C706B36DFEDB0E8DD2A7622BF6RuleMethods0.java,
line=23, column=123
text=integer number too large]
{noformat}
The compilation works fine with the MVEL compiler.