Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-14422

Fix escape handler in Automation Properties loader

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.8.0-HF13, 5.9.4
    • Component/s: Automation
    • Impact type:
      Configuration Change
    • Upgrade notes:
      Hide

      The property nuxeo.automation.properties.multiline.escape is be default equals FALSE.

      If we need activate the escaping, previous behavior, just set nuxeo.automation.properties.multiline.escape=true (nuxeo.conf)

      Show
      The property nuxeo.automation.properties.multiline.escape is be default equals FALSE. If we need activate the escaping, previous behavior, just set nuxeo.automation.properties.multiline.escape=true (nuxeo.conf)

      Description

      When using org.nuxeo.ecm.automation.core.util.Properties#loadProperties, all lines finishing by backslash "\" will escape the line to append the next line. No matter the number of these. (if escaped or not)

      Use case:

      • I use "Document.Update" (Update Properties) Automation operation
      • In my "properties" parameter I put these values:
        dc:title = test \
        dc:description = description
        
      • I get
        dc:title = test dc:description = description
        
      • I should have
        dc:title = test \
        
      • And If I put:
        dc:title = test \\
        dc:description = description
        
      • I get the same result (what ever the number of )

      Proposal:
      We activate or not by system property this part of code in org.nuxeo.ecm.automation.core.util.Properties#loadProperties:

      if (line.endsWith("\\")) {
                      line = line.substring(0, line.length() - 1);
                      prevLine = prevLine != null ? prevLine + line : line;
                      line = in.readLine();
                      continue;
      }
      

      Warning:
      This method is used by workflow, automation and can have lots of impact on existing implementations.

      cf: See SUPNXP ticket for this use case feedback.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: