Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6851

executable-model gets a wrong type from String Concatenation BinaryExpr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.67.0.Final
    • 7.66.0.Final
    • executable model
    • None
    • 2022 Week 08-10 (from Feb 21)
    • 2
    • NEW
    • NEW

    Description

      With a rule like this:

      when
        $s : String()
        eval(Integer.parseInt('1' + $s) > 3)
      

      exec-model throws an error

      InvalidExpressionErrorResult: Method parseInt on class java.lang.Integer with arguments [char] is missing
      

      while it's a valid Java method call (not mvel coercion) which should take String as an argument.
      https://docs.oracle.com/javase/specs/jls/se11/html/jls-15.html#jls-15.18.1

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: