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

TemplateDataListener.newCell filters out correctly blank values; this leads to incorrect template processing

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

XMLWordPrintable

      When using a DataProviderCompiler(), a blank column returned by the DataProvider causes an entire line to not be outputted in the result. I tracked this to a line in TemplateDataListener.newCell which explicitly filters out blank cells, even though such cells should be allowed.

      The template I'm using is:
      <snip>
      template header
      ruleID
      object
      field
      regexp
      replacement

      package standardization

      import [removed].*

      template std_rule
      rule "@

      {ruleID}

      "
      dialect "mvel"
      when
      $o: @

      {object}

      ()
      then
      $o.@

      {field} = $o.?@{field}

      .replaceFirst("@

      {regexp}

      ", "@

      {replacement}

      ");
      end

      end template
      <snip>

      Whenever "replacement" is blank, the consequent does not get generated.

            manstis@redhat.com Michael Anstis
            jjg.denis.robert Denis Robert (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Archived: