jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1404080 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java
Date Wed, 31 Oct 2012 10:34:35 GMT
Author: mreutegg
Date: Wed Oct 31 10:34:35 2012
New Revision: 1404080

URL: http://svn.apache.org/viewvc?rev=1404080&view=rev
Log:
OAK-380: Define conversion of property values
- improve performance of to toCalendar()

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java?rev=1404080&r1=1404079&r2=1404080&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java
Wed Oct 31 10:34:35 2012
@@ -41,6 +41,9 @@ import org.apache.jackrabbit.util.ISO860
  * </pre>
  */
 public final class Conversions {
+
+    private static final TimeZone UTC = TimeZone.getTimeZone("GMT+00:00");
+
     private Conversions() {}
 
     /**
@@ -198,7 +201,7 @@ public final class Conversions {
 
             @Override
             public Calendar toCalendar() {
-                Calendar date = Calendar.getInstance(TimeZone.getTimeZone("GMT+00:00"));
+                Calendar date = Calendar.getInstance(UTC);
                 date.setTimeInMillis(value);
                 return date;
             }



Mime
View raw message