[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1613) functions fail when other functions that start with the same name exist
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Mon Jan 19 00:08:04 EST 2009
[ https://jira.jboss.org/jira/browse/JBRULES-1613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Proctor updated JBRULES-1613:
----------------------------------
Summary: functions fail when other functions that start with the same name exist (was: In one special case, the naming of a Drools-Function causes an error)
> functions fail when other functions that start with the same name exist
> -----------------------------------------------------------------------
>
> Key: JBRULES-1613
> URL: https://jira.jboss.org/jira/browse/JBRULES-1613
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler
> Affects Versions: 4.0.4
> Environment: Windows XP SP2, JRE 1.6.0_01-b06, JDK 1.6.0_01
> Reporter: Michael Katai
> Assignee: Edson Tirelli
> Priority: Trivial
> Fix For: 5.0.0.M5
>
>
> In one special case, the naming of two functions in the drl-File causes an error.
> Here my code (simplified):
>
> package....
> import ....
> rule ...
> when
> ....
> then
> checkHierachyInstance(...);
> end
> function void checkHierachyInstance(...)
> {
> checkHierachyInstanceRecursive(...);
> }
> function void checkHierachyInstanceRecursive(...)
> {
> }
> From this code i get the following runtime-error:
> [ checkHierachyInstance : Function Compilation error
> checkHierachyInstance (line:54): The method checkHierachyInstanceRecursive(Activity, SActivity, int, int) is undefined for the type CheckHierachyInstance ]
> Rule Compilation error :
> [Rule name=action_conditional_starttimereached, agendaGroup=MAIN, salience=0, no-loop=false]
> action_conditional_starttimereached_5491408023587370397/Rule_action_conditional_starttimereached_0.java (15:857)
> : The import action_conditional_starttimereached_5491408023587370397.CheckHierachyInstance cannot be resolved
> action_conditional_starttimereached_5491408023587370397/Rule_action_conditional_starttimereached_0.java (20:1531
> ) : The method checkHierachyInstance(String, Consumer, Activity, SActivity, String) is undefined for the type Rule_actio
> n_conditional_starttimereached_0
> [ checkHierachyInstance : Function Compilation error
> checkHierachyInstance (line:54): The method checkHierachyInstanceRecursive(Activity, SActivity, int, int) is undefined for the type CheckHierachyInstance ]
> As far as i have found out, the error occurs ONLY if I append any character to the functionname "checkHierachyInstance", in my case the word "Recursive". It works if I use a completely different name instead of "checkHierachyInstanceRecursive" or exchange a character in "checkHierachyInstanceRecursive". For example I can use "function void myFunc(...)" or "function void checkHierachyInstancRecursive(...)" instead of "checkHierachyInstanceRecursive" .
> The only combination of function names i'm not allowed to use is checkHierachyInstance and checkHierachyInstanceXXX
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list