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

Fix Blob core test in java 8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0-HF01, 7.1
    • Component/s: Core, Tests

      Description

      The following org.nuxeo.ecm.core.api.impl.blob.TestBlob#testInputStreamBlob test is failing under java 8:

      TestBlob.testInputStreamBlob:189 expected:<...�mh�vަ2��K�$�ϴ	���[�]|���3���NC�PK
                                                                                         �K�...> but was:<...�mh�vަ2��K�$�ϴ	���[]|���3���NC�PK
                                                                                                                                                �K�...>
      

      Hints:
      When creating inputstream is:

      InputStream is = new FileInputStream(new File(url.toURI()));
      

      The inputstream path is missing as attribute in java 8 whereas in java 7, the path is specified correctly.
      Blobs are not null in both version. Just differing.

      Java 7:

      is = {java.io.FileInputStream}
      -> fd = java.io.FileDescriptor
      -> path = "/....../nuxeo/nuxeo-core/nuxeo-core-api/target/test-classes/test.blob"
      [..]
      

      Java 8:

      
      is = {java.io.FileInputStream}
      -> fd = java.io.FileDescriptor
      no path...
      [..]
      

      Finally, updating the file content to simple text as "test", resolve the issue. So definitely an encoding error.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: