[jboss-jira] [JBoss JIRA] Commented: (JBRULES-3198) Comments (!) in certain places flagged as errors, dialect "mvel"
Mario Fusco (JIRA)
jira-events at lists.jboss.org
Wed Sep 7 07:03:26 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-3198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626739#comment-12626739 ]
Mario Fusco commented on JBRULES-3198:
--------------------------------------
This is actually a MVEL bug.
I reported it on the MVEL issue tracking: https://jira.codehaus.org/browse/MVEL-258
and already sent a pull request with a proper unit test and the relative fix: https://github.com/mvel/mvel/pull/15
> Comments (!) in certain places flagged as errors, dialect "mvel"
> ----------------------------------------------------------------
>
> Key: JBRULES-3198
> URL: https://issues.jboss.org/browse/JBRULES-3198
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler (expert)
> Affects Versions: 5.3.0.Beta1
> Reporter: Wolfgang Laun
> Assignee: Mario Fusco
> Priority: Critical
> Fix For: 5.3.0.CR1
>
>
> A bracketed comment (/* - */) is flagged as an error when it appears
> * in a cast after the type name (/*X*/)
> * immediately after a class name after new (/*Y*/)
> Rather wild error messages which don't help at all are emitted, see below.
> import java.util.HashMap;
> declare Student
> name : String @key
> gradeMap : HashMap
> end
> rule KickOff
> dialect "mvel"
> when
> then
> long l = (long /*X*/)0;
> Student s = new Student/*Y*/( "Joe" );
> s.gradeMap = new HashMap/*Y*/();
> insert( s );
> end
> ########### Sample error message:
> Unable to Analyse Expression Student s = new Student/*Y*/( "Joe" );
> s.gradeMap = new HashMap();
> drools.insert( s );:
> [Error: Failed to compileShared: 1 compilation error(s):
> - (1,17) could not resolve class: Student/*Y*/]
> [Near : {... jectGradeMap().put( "CompSc", 0 ); ....}]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list