[jboss-jira] [JBoss JIRA] (JBRULES-3435) DRL: a property name that starts with an non-ASCII letter that can be capitized (such as a French or Russian property name) does not work.
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Thu Mar 29 08:42:47 EDT 2012
[ https://issues.jboss.org/browse/JBRULES-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680305#comment-12680305 ]
Geoffrey De Smet commented on JBRULES-3435:
-------------------------------------------
I 've added a unit test reproducer which is @Ignored in a pull request will fixing a similar, separate issue:
https://github.com/droolsjbpm/drools/pull/111/files#L2R43
> DRL: a property name that starts with an non-ASCII letter that can be capitized (such as a French or Russian property name) does not work.
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBRULES-3435
> URL: https://issues.jboss.org/browse/JBRULES-3435
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler (expert)
> Affects Versions: 5.4.0.Beta2
> Reporter: Geoffrey De Smet
> Assignee: Edson Tirelli
>
> See my pull request.
> This POJO:
> {code}
> public class I18nPerson implements Serializable {
>
> private String garçon; // "boy" in French
> private String élève; // "student" in French (creates a weird getter/setter name)
> private String имя; // "name" in Russian
> public String getGarçon() {
> return garçon;
> }
> public String getÉlève() {
> return élève;
> }
> public String getИмя() {
> return имя;
> }
> }
> {code}
> with this DRL
> {code}
> rule "Use garçon property"
> salience 10
> when
> p : I18nPerson( garçon != null )
> then
> list.add( "garçon" );
> end
> rule "Use élève property"
> salience 10
> when
> p : I18nPerson( élève != null )
> then
> list.add( "éléve" );
> end
> rule "Use имя property"
> salience 10
> when
> p : I18nPerson( имя != null )
> then
> list.add( "имя" );
> end
> {code}
> Give these errors (notice that garçon is ok!):
> {code}
> java.lang.AssertionError: Unable to Analyse Expression élève != null:
> [Error: no such identifier: élève]
> [Near : {... élève != null ....}]
> ^ : [Rule name='Use élève property']
> Unable to Analyse Expression имя != null:
> [Error: no such identifier: имя]
> [Near : {... имя != null ....}]
> ^ : [Rule name='Use имя property']
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list