lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r778795 - /lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java
Date Tue, 26 May 2009 16:50:32 GMT
Author: markrmiller
Date: Tue May 26 16:50:32 2009
New Revision: 778795

URL: http://svn.apache.org/viewvc?rev=778795&view=rev
Log:
use setTimeinMillis - we require 1.4 so we don't need to worry that it was protected on 1.3
anymore

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java?rev=778795&r1=778794&r2=778795&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/DateTools.java Tue May 26 16:50:32
2009
@@ -88,10 +88,7 @@
   public static String timeToString(long time, Resolution resolution) {
     Calendar cal = Calendar.getInstance(GMT);
 
-    //protected in JDK's prior to 1.4
-    //cal.setTimeInMillis(round(time, resolution));
-    
-    cal.setTime(new Date(round(time, resolution)));
+    cal.setTimeInMillis(round(time, resolution));
 
     String result;
     if (resolution == Resolution.YEAR) {



Mime
View raw message