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

Automation RestTest#testEncoding fails when run by maven surefire on non-Linux platforms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6
    • Fix Version/s: 5.6.0-HF08, 5.7.1
    • Component/s: Automation

      Description

      This is caused by the fact that org.nuxeo.ecm.automation.server.jaxrs.io.JsonRequestReader uses org.nuxeo.common.utils.FileUtils#read that uses the default platform encoding (system dependent).

      The file.encoding system property is only defined to UTF-8 in nuxeo.conf hence when running the tests from maven, the behavior is locale dependent hence the failure.

      JsonRequestReader should enforce explicit UTF-8 decoding instead as per: http://tools.ietf.org/html/rfc4627.html

      org.nuxeo.common.utils.FileUtils#read should be deprecated to favor: org.apache.commons.io.IOUtils.toString with an explicit charset parameter instead.

        Attachments

          Activity

            People

            • Assignee:
              ogrisel Olivier Grisel
              Reporter:
              ogrisel Olivier Grisel
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: