Author: markt
Date: Tue Jun 12 10:35:26 2012
New Revision: 1349237

URL: http://svn.apache.org/viewvc?rev=1349237&view=rev
Log:
Deprecate pointless constant

Modified:
    tomcat/trunk/java/org/apache/catalina/ssi/SSIFlastmod.java
    tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java
    tomcat/trunk/java/org/apache/catalina/util/DateTool.java

Modified: tomcat/trunk/java/org/apache/catalina/ssi/SSIFlastmod.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/SSIFlastmod.java?rev=1349237&r1=1349236&r2=1349237&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/SSIFlastmod.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/SSIFlastmod.java Tue Jun 12 
10:35:26 2012
@@ -16,13 +16,13 @@
  */
 package org.apache.catalina.ssi;
 
-
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.Date;
+import java.util.Locale;
 
-import org.apache.catalina.util.DateTool;
 import org.apache.catalina.util.Strftime;
+
 /**
  * Implements the Server-side #flastmod command
  *
@@ -72,7 +72,7 @@ public final class SSIFlastmod implement
 
 
     protected String formatDate(Date date, String configTimeFmt) {
-        Strftime strftime = new Strftime(configTimeFmt, DateTool.LOCALE_US);
+        Strftime strftime = new Strftime(configTimeFmt, Locale.US);
         return strftime.format(date);
     }
 }
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java?rev=1349237&r1=1349236&r2=1349237&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ssi/SSIMediator.java Tue Jun 12 
10:35:26 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.ssi;
 
-
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Date;
@@ -26,10 +25,10 @@ import java.util.Locale;
 import java.util.Set;
 import java.util.TimeZone;
 
-import org.apache.catalina.util.DateTool;
 import org.apache.catalina.util.Strftime;
 import org.apache.catalina.util.URLEncoder;
 import org.apache.tomcat.util.http.HttpMessages;
+
 /**
  * Allows the different SSICommand implementations to share data/talk to each
  * other
@@ -94,8 +93,7 @@ public class SSIMediator {
 
     public void setConfigTimeFmt(String configTimeFmt, boolean 
fromConstructor) {
         this.configTimeFmt = configTimeFmt;
-        //What's the story here with DateTool.LOCALE_US?? Why??
-        this.strftime = new Strftime(configTimeFmt, DateTool.LOCALE_US);
+        this.strftime = new Strftime(configTimeFmt, Locale.US);
         //Variables like DATE_LOCAL, DATE_GMT, and LAST_MODIFIED need to be
         // updated when
         //the timefmt changes. This is what Apache SSI does.

Modified: tomcat/trunk/java/org/apache/catalina/util/DateTool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/DateTool.java?rev=1349237&r1=1349236&r2=1349237&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/DateTool.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/DateTool.java Tue Jun 12 
10:35:26 2012
@@ -36,7 +36,9 @@ public class DateTool {
 
     /**
      * US locale - all HTTP dates are in English
+     * @deprecated Use {@link Locale#US}
      */
+    @Deprecated
     public static final Locale LOCALE_US = Locale.US;
 
     /**
@@ -75,7 +77,7 @@ public class DateTool {
     public static final ThreadLocal<DateFormat> rfc1123Format = new 
ThreadLocal<DateFormat>() {
         @Override
         public DateFormat initialValue() {
-            DateFormat result = new SimpleDateFormat(RFC1123_PATTERN, 
LOCALE_US);
+            DateFormat result = new SimpleDateFormat(RFC1123_PATTERN, 
Locale.US);
             result.setTimeZone(GMT_ZONE);
             return result;
         }
@@ -87,7 +89,7 @@ public class DateTool {
     public static final ThreadLocal<DateFormat> oldCookieFormat = new 
ThreadLocal<DateFormat>() {
         @Override
         public DateFormat initialValue() {
-            DateFormat result = new SimpleDateFormat(OLD_COOKIE_PATTERN, 
LOCALE_US);
+            DateFormat result = new SimpleDateFormat(OLD_COOKIE_PATTERN, 
Locale.US);
             result.setTimeZone(GMT_ZONE);
             return result;
         }
@@ -97,7 +99,7 @@ public class DateTool {
     public static final ThreadLocal<DateFormat> rfc1036Format = new 
ThreadLocal<DateFormat>() {
         @Override
         public DateFormat initialValue() {
-            DateFormat result = new SimpleDateFormat(rfc1036Pattern, 
LOCALE_US);
+            DateFormat result = new SimpleDateFormat(rfc1036Pattern, 
Locale.US);
             result.setTimeZone(GMT_ZONE);
             return result;
         }
@@ -106,7 +108,7 @@ public class DateTool {
     public static final ThreadLocal<DateFormat> asctimeFormat = new 
ThreadLocal<DateFormat>() {
         @Override
         public DateFormat initialValue() {
-            DateFormat result = new SimpleDateFormat(asctimePattern, 
LOCALE_US);
+            DateFormat result = new SimpleDateFormat(asctimePattern, 
Locale.US);
             result.setTimeZone(GMT_ZONE);
             return result;
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to