maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r360588 - /maven/surefire/trunk/surefire/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
Date Sun, 01 Jan 2006 23:09:14 GMT
Author: carlos
Date: Sun Jan  1 15:09:10 2006
New Revision: 360588

URL: http://svn.apache.org/viewcvs?rev=360588&view=rev
Log:
Performance improvement, don't reinstantiate NumberFormat

Modified:
    maven/surefire/trunk/surefire/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java

Modified: maven/surefire/trunk/surefire/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
URL: http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java?rev=360588&r1=360587&r2=360588&view=diff
==============================================================================
--- maven/surefire/trunk/surefire/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
(original)
+++ maven/surefire/trunk/surefire/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
Sun Jan  1 15:09:10 2006
@@ -36,6 +36,8 @@
     protected long startTime;
 
     protected long endTime;
+    
+    private NumberFormat numberFormat = NumberFormat.getInstance();
 
     public void setReportsDirectory( String reportsDirectory )
     {
@@ -151,6 +153,6 @@
 
     protected String elapsedTimeAsString( long runTime )
     {
-        return NumberFormat.getInstance().format( (double) runTime / 1000 );
+        return numberFormat.format( (double) runTime / 1000 );
     }
 }



Mime
View raw message