[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1459) parser/scanner bug: "unterminated literal"
Godmar Back (JIRA)
jira-events at lists.jboss.org
Wed Mar 12 16:46:58 EDT 2008
[ http://jira.jboss.com/jira/browse/JBRULES-1459?page=comments#action_12402583 ]
Godmar Back commented on JBRULES-1459:
--------------------------------------
I believe this was when I had used the wrong MVEL version (1.2.something beta16)
> 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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list