maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1045382 - in /maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report: ReporterManager.java ReporterManagerFactory.java
Date Mon, 13 Dec 2010 21:32:44 GMT
Author: krosenvold
Date: Mon Dec 13 21:32:44 2010
New Revision: 1045382

URL: http://svn.apache.org/viewvc?rev=1045382&view=rev
Log:
[SUREFIRE-495] Fixed memory leak in TeeStream

Modified:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java?rev=1045382&r1=1045381&r2=1045382&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
(original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
Mon Dec 13 21:32:44 2010
@@ -47,9 +47,10 @@ public class ReporterManager
 
     private final SystemStreamCapturer consoleCapturer;
 
-    public ReporterManager( List reports, RunStatistics runStatisticsForThis )
+    public ReporterManager( List reports, RunStatistics runStatisticsForThis,
+                            SystemStreamCapturer systemStreamCapturer )
     {
-        this.consoleCapturer = new SystemStreamCapturer();
+        this.consoleCapturer = systemStreamCapturer;
         runReporter = multicastingReporter = new MulticastingReporter( reports );
         this.runStatisticsForThis = runStatisticsForThis;
     }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java?rev=1045382&r1=1045381&r2=1045382&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
(original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
Mon Dec 13 21:32:44 2010
@@ -59,10 +59,12 @@ public class ReporterManagerFactory
 
     protected final Object lock = new Object();
 
+    private final SystemStreamCapturer systemStreamCapturer = new SystemStreamCapturer();
 
     public ReporterManagerFactory( List reportDefinitions, ClassLoader surefireClassLoader
)
     {
         this( reportDefinitions, surefireClassLoader, null );
+
     }
 
     public ReporterManagerFactory( List reportDefinitions, ClassLoader surefireClassLoader,
@@ -102,7 +104,8 @@ public class ReporterManagerFactory
     {
         // Note, if we ever start making >1 reporter Managers, we have to aggregate run
statistics
         // i.e. we cannot use a single "globalRunStatistics"
-        final ReporterManager reporterManager = new ReporterManager( reports, globalRunStatistics
);
+        final ReporterManager reporterManager = new ReporterManager( reports, globalRunStatistics,
+                                                                     systemStreamCapturer
);
         if ( first == null )
         {
             synchronized ( lock )



Mime
View raw message