[
http://jira.jboss.com/jira/browse/JBRULES-808?page=comments#action_12360236 ]
Edson Tirelli commented on JBRULES-808:
---------------------------------------
Discussed the issue with Michael and as the preference is to keep matchings only for
complete tokens, I changed the code to match only patterns preceed by either a non-word
character (\W) or a line start (^) AND succeeded by a non-word character or line end ($).
So, for the following mapping:
[when]foo=Foo()
The following line will be expanded:
...
when
exists foo
then
...
TO:
...
when
exists Foo()
then
...
As "foo" is preceeded by a space (non-word character) and suceeded by a line
end.
The following line will NOT be expanded:
when
exists foos
then
Because "foo" is succeeded by a word character ("s").
If you think it is the case, we can make the restriction even stronger by having the
mapping key to match only tokens delimited by space characters (\s) instead of only
non-word characters. For now, it is restricted to non-word characters.
DefaultExpander not failing when it should (partial expansion)
--------------------------------------------------------------
Key: JBRULES-808
URL:
http://jira.jboss.com/jira/browse/JBRULES-808
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Reporter: Michael Neale
Assigned To: Edson Tirelli
In DefaultExpanderTest I have added a method:
FIXME_testExpanderFailure()
This shows a drl which should fail.
eg if "foo" expands to "Foo()", then "foos" should NOT
expand to "Foo()s" - it should be an error I believe (correct me if wrong).
--
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