Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3432

Error in error message for bad syntax in function

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

    XMLWordPrintable

Details

    • Hide

      package mvel;
      function Integer englishToInt(String englishNumber){
      return ["one":1, "two":2, "three":3, "four":4, "five":5].get(englishNumber.toLowerCase());
      }

      Show
      package mvel; function Integer englishToInt(String englishNumber){ return ["one":1, "two":2, "three":3, "four":4, "five":5] .get(englishNumber.toLowerCase()); }

    Description

      Without dialect "mvel", this DRL function written in MVEL

      package mvel;
      function Integer englishToInt(String englishNumber){
      return ["one":1, "two":2, "three":3, "four":4, "five":5].get(englishNumber.toLowerCase());
      }

      causes this error message - NOTE THE NAME OF THE FUNCTION!

      Error importing : 'mvel.EnglishToInt.englishToInt'
      [ function englishToIntenglishToInt (line:12): Syntax error on tokens, Name expected instead
      ]

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            laune Wolfgang Laun (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty