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

Improper parsing of right parenthesis in rule consequence

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.0.0.Alpha2
    • 5.2.0.Final, 5.4.0.Final, 5.5.0.Final
    • drools-core (expert)
    • None

    Description

      The right parenthesis is improperly parsed when creating a new object:

      rule "Test Rule"
      dialect "mvel"

      when
      Person()

      then
      SuggestedAction s = new SuggestedAction("suggest something with ) a paren")
      end

      This happens any time you use a new object declaration. It appears to blindly use the parenthesis without considering the quote which results in the following error message during rule compile:

      [Error: unterminated string literal]

      The following syntax compiles without problems:

      rule "Test Rule"
      dialect "mvel"

      when
      Person()

      then
      SuggestedAction sa = new SuggestedAction("Now no parens here")
      sa.putValue("RELEVENCE", "with a ) paren ")
      System.out.println(“I am a ) paren ”)
      end

      Using a left parenthesis does not cause an error. Switching to java dialect does not cause the error.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            cbeesley_jira Chris Beesley (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty