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.

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 5.4.0.Beta2
    • None

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

      Attachments

        Issue Links

          Activity

            People

              etirelli@redhat.com Edson Tirelli
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

              Dates

                Created:
                Updated:
                Archived:

                PagerDuty