[jboss-jira] [JBoss JIRA] (DROOLS-882) Variable on left of matches operator causes 'unable to resolve method' error
Mario Fusco (JIRA)
issues at jboss.org
Fri Aug 14 14:19:03 EDT 2015
[ https://issues.jboss.org/browse/DROOLS-882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco resolved DROOLS-882.
--------------------------------
Fix Version/s: 6.3.0.CR2
Resolution: Done
Fixed in mvel with this commit https://github.com/mvel/mvel/commit/fa86874affd7005e7e2bba9fd7977a8b65965b28
The fix will be available with mvel 2.2.7.Final
> Variable on left of matches operator causes 'unable to resolve method' error
> ----------------------------------------------------------------------------
>
> Key: DROOLS-882
> URL: https://issues.jboss.org/browse/DROOLS-882
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.2.0.Final
> Reporter: Andrew Bickerton
> Assignee: Mario Fusco
> Fix For: 6.3.0.CR2
>
> Attachments: MatchesTest.java
>
>
> Using a variable on the left of 'matches' fails in 6.2.0.FInal, when it worked in 6.1.0.Final. E.g.
> when
> Fact( $field : field )
> RegEx( $field matches pattern )
> results in
> [Error: unable to resolve method: defaultpkg.RegEx.$field() [arglength=0]]
> [Near : {... $field ~= pattern ....}]
> This can be worked around for the positive case by simply moving the constraint, e.g.
> when
> RegEx( $pattern : pattern )
> Fact( field matches $pattern )
> But it makes it impossible to find facts that are not matched by any regex, e.g.
> when
> Fact( $field : field )
> not RegEx( $field matches pattern )
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list