Skip to content

Commit

Permalink
[SUREFIRE-2224] StatelessXmlReporter#getTestProblems() does not prope…
Browse files Browse the repository at this point in the history
…rly reflect report schema structure

This closes #702
  • Loading branch information
michael-o committed Dec 21, 2023
1 parent 8676714 commit 6eb7d7e
Showing 1 changed file with 6 additions and 14 deletions.
Expand Up @@ -432,7 +432,7 @@ private static void getTestProblems(
boolean trimStackTrace,
OutputStream fw,
String testErrorType,
boolean createOutErrElementsInside)
boolean enableNestedOutErrElements)
throws IOException {
ppw.startElement(testErrorType);

Expand All @@ -456,21 +456,13 @@ private static void getTestProblems(
}
}

boolean hasNestedElements = createOutErrElementsInside & stackTrace != null;

if (stackTrace != null) {
if (hasNestedElements) {
ppw.startElement("stackTrace");
if (enableNestedOutErrElements) {
ppw.startElement("stackTrace");
if (stackTrace != null) {
extraEscapeElementValue(stackTrace, outputStreamWriter, ppw, fw);
}
ppw.endElement();

extraEscapeElementValue(stackTrace, outputStreamWriter, ppw, fw);

if (hasNestedElements) {
ppw.endElement();
}
}

if (createOutErrElementsInside) {
createOutErrElements(outputStreamWriter, ppw, report, fw);
}

Expand Down

0 comments on commit 6eb7d7e

Please sign in to comment.