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

Improper parsing of right parenthesis in rule consequence

    Details

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                cbeesley Chris Beesley
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: