You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2018/08/26 22:24:14 UTC

[maven-surefire] branch INV1561 updated: removed logger code

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch INV1561
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/INV1561 by this push:
     new 2e01fa1  removed logger code
2e01fa1 is described below

commit 2e01fa18b2756220e3c4acaad5b27b4ca6b4447b
Author: Tibor17 <ti...@apache.org>
AuthorDate: Mon Aug 27 00:23:58 2018 +0200

    removed logger code
---
 .../maven/surefire/booter/ForkingRunListener.java  | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java b/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java
index acfc7eb..ce806b9 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java
@@ -21,7 +21,6 @@ package org.apache.maven.surefire.booter;
 
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLoggerUtils;
-import org.apache.maven.shared.utils.io.FileUtils;
 import org.apache.maven.surefire.report.ConsoleOutputReceiver;
 import org.apache.maven.surefire.report.ConsoleStream;
 import org.apache.maven.surefire.report.ReportEntry;
@@ -32,11 +31,8 @@ import org.apache.maven.surefire.report.StackTraceWriter;
 import org.apache.maven.surefire.report.TestSetReportEntry;
 import org.apache.maven.surefire.util.internal.StringUtils.EncodedArray;
 
-import java.io.File;
-import java.io.IOException;
 import java.io.PrintStream;
 import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicInteger;
 
 import static java.lang.Integer.toHexString;
 import static java.nio.charset.Charset.defaultCharset;
@@ -202,23 +198,9 @@ public class ForkingRunListener
         }
     }
 
-    private static final AtomicInteger INT = new AtomicInteger();
-
     @Override
     public void writeTestOutput( byte[] buf, int off, int len, boolean stdout )
     {
-        try
-        {
-            File console = new File( "target/console-" + INT.getAndIncrement() );
-            //noinspection ResultOfMethodCallIgnored
-            console.createNewFile();
-            String[] msg = { new String( buf, off, len ) };
-            FileUtils.fileWriteArray( console, "UTF-8", msg );
-        }
-        catch ( IOException e )
-        {
-            // do nothing
-        }
         EncodedArray encodedArray = escapeBytesToPrintable( stdout ? stdOutHeader : stdErrHeader, buf, off, len );
 
         synchronized ( target ) // See notes about synchronization/thread safety in class javadoc
@@ -320,18 +302,6 @@ public class ForkingRunListener
 
     private void encodeAndWriteToTarget( String string )
     {
-        try
-        {
-            File console = new File( "target/console-" + INT.getAndIncrement() );
-            //noinspection ResultOfMethodCallIgnored
-            console.createNewFile();
-            String[] msg = { string };
-            FileUtils.fileWriteArray( console, "UTF-8", msg );
-        }
-        catch ( IOException e )
-        {
-            // do nothing
-        }
         byte[] encodeBytes = encodeStringForForkCommunication( string );
         synchronized ( target ) // See notes about synchronization/thread safety in class javadoc
         {