cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-6009] Statically initializing a GMT time zone, patch from Lucas Pouzac applied
Date Thu, 18 Sep 2014 13:31:25 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 1a1259841 -> 797c3f3b4


[CXF-6009] Statically initializing a GMT time zone, patch from Lucas Pouzac applied


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/797c3f3b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/797c3f3b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/797c3f3b

Branch: refs/heads/master
Commit: 797c3f3b4f52c4d3df060377c6abc15f65fa4ad6
Parents: 1a12598
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Sep 18 14:31:11 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Sep 18 14:31:11 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/transport/http/Headers.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/797c3f3b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
index 3a3b217..cf5f0ed 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
@@ -66,7 +66,7 @@ public class Headers {
     public static final String PROTOCOL_HEADERS_CONTENT_TYPE = Message.CONTENT_TYPE.toLowerCase();
     public static final String HTTP_HEADERS_SETCOOKIE = "Set-Cookie";
     public static final String HTTP_HEADERS_LINK = "Link";
-    
+    private static final TimeZone TIME_ZONE_GMT = TimeZone.getTimeZone("GMT");
     private static final Logger LOG = LogUtils.getL7dLogger(Headers.class);
     
     /**
@@ -490,10 +490,8 @@ public class Headers {
     }
 
     public static SimpleDateFormat getHttpDateFormat() {
-        SimpleDateFormat dateFormat = 
-            new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
-        TimeZone tZone = TimeZone.getTimeZone("GMT");
-        dateFormat.setTimeZone(tZone);
+        SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz",
Locale.US);
+        dateFormat.setTimeZone(TIME_ZONE_GMT);
         return dateFormat;
     }
     


Mime
View raw message