[jboss-jira] [JBoss JIRA] (DROOLS-882) Variable on left of matches operator causes 'unable to resolve method' error

Andrew Bickerton (JIRA) issues at jboss.org
Fri Aug 14 00:01:02 EDT 2015


Andrew Bickerton created DROOLS-882:
---------------------------------------

             Summary: 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


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