[JBoss JIRA] (DROOLS-287) Rule names with non-alphabetic characters may lead to name clashes
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/DROOLS-287?page=com.atlassian.jira.plugin... ]
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
11 years, 3 months
[JBoss JIRA] (DROOLS-287) Rule names with non-alphabetic characters may lead to name clashes
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/DROOLS-287?page=com.atlassian.jira.plugin... ]
Geoffrey De Smet edited comment on DROOLS-287 at 10/7/13 2:55 AM:
------------------------------------------------------------------
That's probably because Java classnames can't contain "<" or ">" and the rules becomes java class files.
Solution A): a solution to this is *escaping*, for example with the "$" character:
"Rule_>" becomes "Rule_$gt$"
"Rule_<" becomes "Rule_$lt$"
"Rule_$" becomes "Rule_$dollar$"
"Rule_£" becomes "Rule_$u1245$" (presuming that 1245 is the unicode for £)
"Rule a" becomes "Rule$space$a"
"Rule a" becomes "Rule$space$$space$a"
was (Author: ge0ffrey):
That's probably because Java classnames can't contain "<" or ">" and the rules becomes java class files.
A solution to this is *escaping*, for example with the "$" character:
"Rule_>" becomes "Rule_$gt$"
"Rule_<" becomes "Rule_$lt$"
"Rule_$" becomes "Rule_$dollar$"
"Rule_£" becomes "Rule_$u1245$" (presuming that 1245 is the unicode for £)
"Rule a" becomes "Rule$space$a"
"Rule a" becomes "Rule$space$$space$a"
> 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
11 years, 3 months
[JBoss JIRA] (DROOLS-287) Rule names with non-alphabetic characters may lead to name clashes
by Davide Sottara (JIRA)
[ https://issues.jboss.org/browse/DROOLS-287?page=com.atlassian.jira.plugin... ]
Davide Sottara commented on DROOLS-287:
---------------------------------------
I agree. The solution currently implemented replaces illegal characters with underscores, and then uses an incrementing counter to resolve ambiguities.
But this would make it impossible to determine the name of the class from the name of the rule alone, which may be a problem in some case.
I'll see if this can be fixed easily
> 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
11 years, 3 months
[JBoss JIRA] (AS7-6423) JBoss RPM doesn't adhere to LFS
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/AS7-6423?page=com.atlassian.jira.plugin.s... ]
RH Bugzilla Integration commented on AS7-6423:
----------------------------------------------
Fernando Nasser <fnasser(a)redhat.com> changed the Status of [bug 1011067|https://bugzilla.redhat.com/show_bug.cgi?id=1011067] from NEW to CLOSED
> JBoss RPM doesn't adhere to LFS
> -------------------------------
>
> Key: AS7-6423
> URL: https://issues.jboss.org/browse/AS7-6423
> Project: Application Server 7
> Issue Type: Enhancement
> Components: Build System
> Affects Versions: 7.1.2.Final (EAP)
> Environment: Red Hat Enterprise Linux Server release 6.3 (Santiago)
> Reporter: rafael liu
> Assignee: Fernando Nasser
> Priority: Minor
> Labels: rpm
>
> In /usr/share/jbossas/domain links to tmp and data folders were mixed up:
> {noformat}
> [domain]]# ls -l
> total 4
> lrwxrwxrwx. 1 jboss jboss 19 Jan 2 14:45 configuration -> /etc/jbossas/domain
> lrwxrwxrwx. 1 jboss jboss 23 Jan 2 14:45 data -> /var/tmp/jbossas/domain
> lrwxrwxrwx. 1 jboss jboss 23 Jan 2 14:45 log -> /var/log/jbossas/domain
> drwxrwxr-x. 5 jboss jboss 4096 Jan 2 16:02 servers
> lrwxrwxrwx. 1 jboss jboss 25 Jan 2 14:45 tmp -> /var/cache/jbossas/domain
> {noformat}
> In /usr/share/jbossas/standalone tmp folder is not linked:
> {noformat}
> [standalone]# ls -l
> total 12
> lrwxrwxrwx. 1 jboss jboss 23 Jan 2 14:45 configuration -> /etc/jbossas/standalone
> drwxr-xr-x. 2 jboss jboss 4096 Jan 2 14:45 deployments
> drwxr-xr-x. 3 jboss jboss 4096 Jan 2 14:45 lib
> lrwxrwxrwx. 1 jboss jboss 27 Jan 2 14:45 log -> /var/log/jbossas/standalone
> drwxr-xr-x. 3 jboss jboss 4096 Jan 2 14:45 tmp
> {noformat}
--
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
11 years, 3 months
[JBoss JIRA] (AS7-6423) JBoss RPM doesn't adhere to LFS
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/AS7-6423?page=com.atlassian.jira.plugin.s... ]
RH Bugzilla Integration commented on AS7-6423:
----------------------------------------------
Fernando Nasser <fnasser(a)redhat.com> made a comment on [bug 1011067|https://bugzilla.redhat.com/show_bug.cgi?id=1011067]
> JBoss RPM doesn't adhere to LFS
> -------------------------------
>
> Key: AS7-6423
> URL: https://issues.jboss.org/browse/AS7-6423
> Project: Application Server 7
> Issue Type: Enhancement
> Components: Build System
> Affects Versions: 7.1.2.Final (EAP)
> Environment: Red Hat Enterprise Linux Server release 6.3 (Santiago)
> Reporter: rafael liu
> Assignee: Fernando Nasser
> Priority: Minor
> Labels: rpm
>
> In /usr/share/jbossas/domain links to tmp and data folders were mixed up:
> {noformat}
> [domain]]# ls -l
> total 4
> lrwxrwxrwx. 1 jboss jboss 19 Jan 2 14:45 configuration -> /etc/jbossas/domain
> lrwxrwxrwx. 1 jboss jboss 23 Jan 2 14:45 data -> /var/tmp/jbossas/domain
> lrwxrwxrwx. 1 jboss jboss 23 Jan 2 14:45 log -> /var/log/jbossas/domain
> drwxrwxr-x. 5 jboss jboss 4096 Jan 2 16:02 servers
> lrwxrwxrwx. 1 jboss jboss 25 Jan 2 14:45 tmp -> /var/cache/jbossas/domain
> {noformat}
> In /usr/share/jbossas/standalone tmp folder is not linked:
> {noformat}
> [standalone]# ls -l
> total 12
> lrwxrwxrwx. 1 jboss jboss 23 Jan 2 14:45 configuration -> /etc/jbossas/standalone
> drwxr-xr-x. 2 jboss jboss 4096 Jan 2 14:45 deployments
> drwxr-xr-x. 3 jboss jboss 4096 Jan 2 14:45 lib
> lrwxrwxrwx. 1 jboss jboss 27 Jan 2 14:45 log -> /var/log/jbossas/standalone
> drwxr-xr-x. 3 jboss jboss 4096 Jan 2 14:45 tmp
> {noformat}
--
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
11 years, 3 months
[JBoss JIRA] (DROOLS-287) Rule names with non-alphabetic characters may lead to name clashes
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/DROOLS-287?page=com.atlassian.jira.plugin... ]
Geoffrey De Smet edited comment on DROOLS-287 at 10/6/13 3:35 AM:
------------------------------------------------------------------
That's probably because Java classnames can't contain "<" or ">" and the rules becomes java class files.
A solution to this is *escaping*, for example with the "$" character:
"Rule_>" becomes "Rule_$gt$"
"Rule_<" becomes "Rule_$lt$"
"Rule_$" becomes "Rule_$dollar$"
"Rule_£" becomes "Rule_$u1245$" (presuming that 1245 is the unicode for £)
"Rule a" becomes "Rule$space$a"
"Rule a" becomes "Rule$space$$space$a"
was (Author: ge0ffrey):
That's probably because Java classnames can't contain "<" or ">" and the rules becomes java class files.
A solution to this is escaping, for example with the "$" character:
"Rule_>" becomes "Rule_$gt$"
"Rule_<" becomes "Rule_$lt$"
"Rule_$" becomes "Rule_$dollar$"
"Rule_£" becomes "Rule_$u1245$" (presuming that 1245 is the unicode for £)
"Rule a" becomes "Rule$space$a"
"Rule a" becomes "Rule$space$$space$a"
> 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
11 years, 3 months