[jboss-jira] [JBoss JIRA] (DROOLS-82) unbalanced braces ( ... ) error when performing equalsIgnoreCase where RHS contains !. operator

Marcin Grzejszczak (JIRA) jira-events at lists.jboss.org
Mon Mar 18 10:55:42 EDT 2013


Marcin Grzejszczak created DROOLS-82:
----------------------------------------

             Summary: unbalanced braces ( ... ) error when performing equalsIgnoreCase where RHS contains !. operator
                 Key: DROOLS-82
                 URL: https://issues.jboss.org/browse/DROOLS-82
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 5.5
            Reporter: Marcin Grzejszczak
            Assignee: Mark Proctor
         Attachments: Test.zip

GIVEN RULE:

rule "Nested nested model rule - doesn't compile"
    dialect "mvel"
when
    $model : Model( $nestedModel : nestedModel,
                    $nestedNestedModel : nestedModel!.nestedNestedModel,
                    "NestedNestedModelName".equalsIgnoreCase(nestedModel!.nestedNestedModel!.nestedNestedModelName) )
then
    System.out.println( "I'm a  nested nested model! My name is [" + $nestedNestedModel.nestedNestedModelName +"] " );
end

The following error occurs:

Caused by: java.lang.RuntimeException: Unable to Analyse Expression "NestedNestedModelName".equalsIgnoreCase(nestedModel != null && "NestedNestedModelName".equalsIgnoreCase(nestedModel.nestedNestedModel != null && "NestedNestedModelName".equalsIgnoreCase(nestedModel.nestedNestedModel.nestedNestedModelName):
[Error: unbalanced braces ( ... )]
[Near : {... me".equalsIgnoreCase(nestedModel != null && "Neste ....}]
                                                    ^
[Line: 6, Column: 4] : [Rule name='Nested nested model rule - doesn't compile']


	at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:121)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
	... 17 more


The project needed to replicate the issue is attached to the issue

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list