Author: markt
Date: Thu Jun  4 15:18:21 2009
New Revision: 781770

URL: http://svn.apache.org/viewvc?rev=781770&view=rev
Log:
Remove generics component of ported patch as it breaks Tomcat 4 build.

Modified:
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/DateTool.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/DateTool.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/DateTool.java?rev=781770&r1=781769&r2=781770&view=diff
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/DateTool.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/DateTool.java 
Thu Jun  4 15:18:21 2009
@@ -66,8 +66,8 @@
 
     /** DateFormat to be used to format dates. Called from MessageBytes
      */
-    private final static ThreadLocal<DateFormat> rfc1123Format = new 
ThreadLocal<DateFormat>() {
-        public DateFormat initialValue() {
+    private final static ThreadLocal rfc1123Format = new ThreadLocal() {
+        public Object initialValue() {
             DateFormat result = new SimpleDateFormat(RFC1123_PATTERN, 
LOCALE_US);
             result.setTimeZone(GMT_ZONE);
             return result;
@@ -77,8 +77,8 @@
     /** DateFormat to be used to format old netscape cookies
        Called from ServerCookie
      */
-    private final static ThreadLocal<DateFormat> oldCookieFormat = new 
ThreadLocal<DateFormat>() {
-        public DateFormat initialValue() {
+    private final static ThreadLocal oldCookieFormat = new ThreadLocal() {
+        public Object initialValue() {
             DateFormat result = new SimpleDateFormat(OLD_COOKIE_PATTERN, 
LOCALE_US);
             result.setTimeZone(GMT_ZONE);
             return result;
@@ -86,16 +86,16 @@
     };
 
     
-    private final static ThreadLocal<DateFormat> rfc1036Format = new 
ThreadLocal<DateFormat>() {
-        public DateFormat initialValue() {
+    private final static ThreadLocal rfc1036Format = new ThreadLocal() {
+        public Object initialValue() {
             DateFormat result = new SimpleDateFormat(rfc1036Pattern, 
LOCALE_US);
             result.setTimeZone(GMT_ZONE);
             return result;
         }
     };
 
-    private final static ThreadLocal<DateFormat> asctimeFormat = new 
ThreadLocal<DateFormat>() {
-        public DateFormat initialValue() {
+    private final static ThreadLocal asctimeFormat = new ThreadLocal() {
+        public Object initialValue() {
             DateFormat result = new SimpleDateFormat(asctimePattern, 
LOCALE_US);
             result.setTimeZone(GMT_ZONE);
             return result;
@@ -118,7 +118,7 @@
      */
     public static String format1123( Date d ) {
        String dstr=null;
-           dstr = format1123(d, rfc1123Format.get());
+           dstr = format1123(d, (DateFormat) rfc1123Format.get());
        return dstr;
     } 
 
@@ -138,14 +138,14 @@
     public static void formatOldCookie( Date d, StringBuffer sb,
                                          FieldPosition fp )
     {
-           oldCookieFormat.get().format( d, sb, fp );
+           ((DateFormat)oldCookieFormat.get()).format( d, sb, fp );
     }
 
     // Called from ServerCookie
     public static String formatOldCookie( Date d )
     {
        String ocf=null;
-           ocf= oldCookieFormat.get().format( d );
+           ocf= ((DateFormat)oldCookieFormat.get()).format( d );
        return ocf;
     }
 
@@ -154,7 +154,8 @@
        Not efficient - but not very used.
      */
     public static long parseDate( String dateString ) {
-       DateFormat [] format = 
{rfc1123Format.get(),rfc1036Format.get(),asctimeFormat.get()};
+       DateFormat [] format = { (DateFormat)rfc1123Format.get(),
+               (DateFormat) rfc1036Format.get(), (DateFormat) 
asctimeFormat.get()};
        return parseDate(dateString,format);
     }
     public static long parseDate( String dateString, DateFormat []format ) {



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

Reply via email to