You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/12/21 12:22:59 UTC
(maven-surefire) branch simplify created (now 065cf91a0)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch simplify
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
at 065cf91a0 Simplify condition for nested output/error elements
This branch includes the following new commits:
new 065cf91a0 Simplify condition for nested output/error elements
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-surefire) 01/01: Simplify condition for nested output/error elements
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch simplify
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 065cf91a012bedeedd4b79e74be243cd9e8024b1
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu Dec 21 13:22:51 2023 +0100
Simplify condition for nested output/error elements
---
.../maven/plugin/surefire/report/StatelessXmlReporter.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
index 62299da4e..3dfeb6bf7 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
@@ -432,7 +432,7 @@ public class StatelessXmlReporter implements StatelessReportEventListener<Wrappe
boolean trimStackTrace,
OutputStream fw,
String testErrorType,
- boolean createOutErrElementsInside)
+ boolean enableNestedOutErrElements)
throws IOException {
ppw.startElement(testErrorType);
@@ -456,21 +456,19 @@ public class StatelessXmlReporter implements StatelessReportEventListener<Wrappe
}
}
- boolean hasNestedElements = createOutErrElementsInside & stackTrace != null;
-
if (stackTrace != null) {
- if (hasNestedElements) {
+ if (enableNestedOutErrElements) {
ppw.startElement("stackTrace");
}
extraEscapeElementValue(stackTrace, outputStreamWriter, ppw, fw);
- if (hasNestedElements) {
+ if (enableNestedOutErrElements) {
ppw.endElement();
}
}
- if (createOutErrElementsInside) {
+ if (enableNestedOutErrElements) {
createOutErrElements(outputStreamWriter, ppw, report, fw);
}