[ 
https://issues.apache.org/jira/browse/CAMEL-27408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-27408.
---------------------------------
    Resolution: Fixed

Fixed by https://github.com/apache/camel/pull/30622 (merged to main for 4.24.0).

_Claude Code on behalf of davsclaus_

> camel-groovy: testMarshalDOM of GroovyXmlDataFormatTest fails on Windows
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-27408
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27408
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-groovy, tests
>    Affects Versions: 4.23.0
>            Reporter: Saravanakumar Selvaraj
>            Assignee: Saravanakumar Selvaraj
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found on Windows, in a run of the tests of camel-groovy for CAMEL-27401. 
> testMarshalDOM of GroovyXmlDataFormatTest fails there at its comparison of 
> the marshalled XML.
> The test marshals a DOM document with the groovyXml data format. The data 
> format hands a DOM document to the type converter, which uses the XML 
> serializer of the JDK. That serializer writes each line break with the line 
> separator of the platform. So the result has CRLF line ends on Windows.
> The test appends System.lineSeparator() to the result and compares it with a 
> Java text block. A text block has LF line ends on every platform. On Windows 
> the result has 14 CR characters that the text block does not have. Without 
> them the two texts are equal.
> The other tests of the class marshal a Groovy Node, a Map or a Jackson JSON 
> node. They pass on Windows.
> Proposed change: the test replaces the line separator of the platform with LF 
> before the comparison. Only the test changes.
> Seen on Windows with Java 21. The tag camel-4.23.0 has the same test method. 
> A run of the JDK serializer with both line separators shows the same 
> difference.
> _Claude Code on behalf of saravanakumar1987_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to