Uploaded image for project: 'Commons SCXML'
  1. Commons SCXML
  2. SCXML-168

Test failure in SCXMLWriterTest using Java 7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • None
    • Oracle Java 1.7.0_40-b43

    Description

      Tests in the SCXMLWriterTest use StaX to transform SCXML to a pretty printed output and then compare this to a predefined expected output.
      However this is not reliable across Java compilers as to how pretty printing is precisely done.
      In this case, with (Oracle) Java 6, a newline is inserted between the XML declaration and the root element, while on (Oracle) Java 7 no such newline is added. As result these tests fail with Java 7.

      For these tests I think it is easy to fix: there is no functional need (here) to compare the XML output pretty formatted, so I simply removed the pretty printing and adjusted the predefined String to compare against.

      I'll attach a patch file shortly.

      Attachments

        1. SCXML-168.patch
          4 kB
          Ate Douma

        Activity

          People

            ate Ate Douma
            ate Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: