[jboss-jira] [JBoss JIRA] (DROOLS-452) MVEL validates illegal expressions using ":"
Petr Široký (JIRA)
issues at jboss.org
Sat Jan 16 14:56:00 EST 2016
[ https://issues.jboss.org/browse/DROOLS-452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149690#comment-13149690 ]
Petr Široký commented on DROOLS-452:
------------------------------------
It seems this has been fixed over the time. Trying to reproduce, I am getting compile-time error
{code}
java.lang.RuntimeException: [Message [id=1, level=ERROR, path=file0.drl, line=1, column=0
text=Unable to Analyse Expression System.out.println( "Hello" ): ;:
[Error: Malformed expression]
[Near : {... System.out.println( "Hello" ): ; ....}]
^
[Line: 1, Column: 33]]]
{code}
The message looks a bit weird though. Not sure why the additional ";:" is there. [~dsotty] could you double check the above message if it is something you would expect?
> MVEL validates illegal expressions using ":"
> --------------------------------------------
>
> Key: DROOLS-452
> URL: https://issues.jboss.org/browse/DROOLS-452
> Project: Drools
> Issue Type: Bug
> Reporter: Davide Sottara
> Assignee: Petr Široký
> Priority: Minor
>
> A rule like this
> {code}
> rule "Typo"
> dialect "mvel"
> when
> ...
> then
> // Notice the ":" in place of ";". There is also a \n at the end of the line
> System.out.println( "Hello" ):
> // more statements here
> end
> {code}
> MVEL will validate the RHS at compile time.
> At runtime, the printout (actually any statement ending with ":") will be
> executed, but MVEL will fail silently thereafter. The rest of the conclusion
> will not be evaluated.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list