Chris Beesley created JBRULES-3698:
--------------------------------------
Summary: Improper parsing of right parenthesis in rule consequence
Key: JBRULES-3698
URL:
https://issues.jboss.org/browse/JBRULES-3698
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.5.0.Final, 5.4.0.Final, 5.2.0.Final
Reporter: Chris Beesley
Assignee: Mark Proctor
The right parenthesis is improperly parsed when creating a new object:
rule "Test Rule"
dialect "mvel"
when
Person()
then
SuggestedAction s = new SuggestedAction("suggest something with ) a paren")
end
This happens any time you use a new object declaration. It appears to blindly use the
parenthesis without considering the quote which results in the following error message
during rule compile:
[Error: unterminated string literal]
The following syntax compiles without problems:
rule "Test Rule"
dialect "mvel"
when
Person()
then
SuggestedAction sa = new SuggestedAction("Now no parens here")
sa.putValue("RELEVENCE", "with a ) paren ")
System.out.println(“I am a ) paren ”)
end
Using a left parenthesis does not cause an error. Switching to java dialect does not cause
the error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira