lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1440836 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
Date Thu, 31 Jan 2013 03:18:59 GMT
Author: rmuir
Date: Thu Jan 31 03:18:58 2013
New Revision: 1440836

URL: http://svn.apache.org/viewvc?rev=1440836&view=rev
Log:
fix this to be explicit about which locale it is (or isnt) using...

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SimplePostTool.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SimplePostTool.java?rev=1440836&r1=1440835&r2=1440836&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SimplePostTool.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SimplePostTool.java Thu Jan 31
03:18:58 2013
@@ -190,16 +190,18 @@ public class SimplePostTool {
    * @param millis the time in milliseconds
    */
   private void displayTiming(long millis) {
+    // TODO: if the intent is user-display: this should use SimpleDateFormat 
+    // or similar instead of homemade formatting.
     long hours = millis / 3600000;
     long minutes = (millis / 60000) % 60;
     long seconds = (millis / 1000) % 60;
     long milliseconds = millis % 1000;
     if (hours>0) {
-      System.out.println(String.format("Time taken: %02d:%02d:%02d.%03d", hours, minutes,
seconds, milliseconds));
+      System.out.println(String.format(Locale.getDefault(), "Time taken: %02d:%02d:%02d.%03d",
hours, minutes, seconds, milliseconds));
     } else if (minutes>0) {
-      System.out.println(String.format("Time taken: %02d:%02d.%03d", minutes, seconds, milliseconds));
+      System.out.println(String.format(Locale.getDefault(), "Time taken: %02d:%02d.%03d",
minutes, seconds, milliseconds));
     } else {
-      System.out.println(String.format("Time taken: %d.%03ds", seconds, milliseconds));
+      System.out.println(String.format(Locale.getDefault(), "Time taken: %d.%03ds", seconds,
milliseconds));
     }
  }
 



Mime
View raw message