]
Edson Tirelli closed JBRULES-1459.
----------------------------------
Thanks for the feedback. Closing the ticket.
parser/scanner bug: "unterminated literal"
------------------------------------------
Key: JBRULES-1459
URL:
http://jira.jboss.com/jira/browse/JBRULES-1459
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.4
Reporter: Godmar Back
Assigned To: Edson Tirelli
Fix For: 5.0.0-M1, 4.0.5
The following test:
package test;
import java.util.Collections;
import java.util.Map;
import java.util.HashMap;
dialect "mvel"
rule "Rule #1"
when
then
m = new HashMap();
m.put("content", "hello ;=");
insert(m);
end
rule "Rule #2"
when
s : Map (this["content"] matches "hello ;=")
then
System.out.println("found it " + s);
end
----
produces:
Exception in thread "main" org.drools.rule.InvalidRulePackage: Unable to
determine the used declarations.
Failed to compile:
[Error: unterminated literal]
[Near: "' "hell'"] : [Rule name=Rule #2, agendaGroup=MAIN,
salience=0, no-loop=false]
at org.drools.rule.Package.checkValidity(Package.java:424)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:384)
....
but this test works:
package test;
import java.util.Collections;
import java.util.Map;
import java.util.HashMap;
dialect "mvel"
rule "Rule #1"
when
then
m = new HashMap();
m.put("content", "hello ;=");
insert(m);
end
rule "Rule #2"
when
s : Map (this["content"] matches "hello ..")
then
System.out.println("found it " + s);
end
(The only difference between the two is that the right-hand side of "matches"
was changed from "hello ;=" to "hello ..")
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: