[SUREFIRE] refactoring

Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/4f3f59e2
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/4f3f59e2
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/4f3f59e2

Branch: refs/heads/junit5
Commit: 4f3f59e2dcdeba154c7d22dea05f906e6f54d0e7
Parents: 02a8a59
Author: Tibor17 <tibo...@lycos.com>
Authored: Sat Oct 1 02:32:11 2016 +0200
Committer: Tibor17 <tibo...@lycos.com>
Committed: Sun Oct 2 11:12:37 2016 +0200

----------------------------------------------------------------------
 .../maven/plugin/surefire/report/StatelessXmlReporter.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4f3f59e2/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
----------------------------------------------------------------------
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 9e22f1e..f30e54f 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
@@ -293,7 +293,6 @@ public class StatelessXmlReporter
 
         try
         {
-
             return new FileOutputStream( reportFile );
         }
         catch ( Exception e )
@@ -322,9 +321,9 @@ public class StatelessXmlReporter
     private static File getReportFile( ReportEntry report, File 
reportsDirectory, String reportNameSuffix )
     {
         String reportName = "TEST-" + report.getName();
-        return isNotBlank( reportNameSuffix )
-            ? new File( reportsDirectory, stripIllegalFilenameChars( 
reportName + "-" + reportNameSuffix + ".xml" ) )
-            : new File( reportsDirectory, stripIllegalFilenameChars( 
reportName + ".xml" ) );
+        String reportFileName =
+                isNotBlank( reportNameSuffix ) ? reportName + "-" + 
reportNameSuffix + ".xml" : reportName + ".xml";
+        return new File( reportsDirectory, stripIllegalFilenameChars( 
reportFileName ) );
     }
 
     private static void startTestElement( XMLWriter ppw, WrappedReportEntry 
report, String reportNameSuffix,

Reply via email to