Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7342

org.apache.cxf.attachment.AttachmentUtilTest.xml fails with jdk 9 preview

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • None
    • None
    • Unknown

    Description

      org.junit.ComparisonFailure: expected:<[世界ーファイル].txt> but was:<[世界ーファイル].txt>
      at org.apache.cxf.attachment.AttachmentUtilTest.testContendDispositionFileNameKanjiChars(AttachmentUtilTest.java:100)

      JEP 254: Compact Strings changes the way java Strings are internalized. The test case has a hardcoded utf-16 string to 'cheat' the utf-8 Kanji characters. When compiled with jdk 8 and ran with java 9 the utf-16 hardcoded string: "世界ーファイル" is handled literally and the comparison fails, even though the output of [世界ーファイル].txt is correct.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            atanders Adam Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: