Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. 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.

    Details

      Description

      See my pull request.

      This POJO:

      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 имя;
          }
      
      }
      

      with this DRL

      
      
      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
      

      Give these errors (notice that garçon is ok!):

      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']
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tirelli Edson Tirelli
                  Reporter:
                  ge0ffrey Geoffrey De Smet
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated: