[jboss-jira] [JBoss JIRA] (DROOLS-287) Rule names with non-alphabetic characters may lead to name clashes
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Mon Oct 7 03:01:02 EDT 2013
[ https://issues.jboss.org/browse/DROOLS-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12810303#comment-12810303 ]
Geoffrey De Smet commented on DROOLS-287:
-----------------------------------------
Solution B) Prune the invalid characters like it does now (for example "dollareuro", but keep a Map to it's original ruleName too (for example "dollar > euro".
If a conflicting pruned rulename "dollareuro" is found:
- Check the original ruleName "dollar > euro" is indeed unique (fail-fast if it's not)
- Append "1" to the pruned ruleName, "dollareuro1", check if it's unique.
- If not unique (still conflicting): Append "2" instead: "dollareuro2"
- etc "dollareuro3", ..., "dollareuro9", "dollareuro10", "dollareuro11", ...
Personally, I believe solution A) is better then solution B).
> Rule names with non-alphabetic characters may lead to name clashes
> ------------------------------------------------------------------
>
> Key: DROOLS-287
> URL: https://issues.jboss.org/browse/DROOLS-287
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final, 6.0.0.CR4
> Reporter: Davide Sottara
> Assignee: Mark Proctor
> Priority: Critical
> Fix For: 5.5.1.Final, 6.0.0.CR5
>
>
> A KB with the two following rules will not compile:
> {code}
> rule "Rule_>"
> when then end
> rule "Rule_<"
> when then end
> {code}
> Here's a more realistic example:
> {code}
> rule "dollar > euro"
> when then end
> rule "dollar < euro"
> when then end
> {code}
--
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