You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/30 13:08:53 UTC

[tomcat] 06/06: Deprecate FastHttpDateFormat.formatDate(long, DateFormat)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 1a772c43e3d13791464af5a3bf8141ff08e1d219
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jul 29 21:32:28 2019 +0100

    Deprecate FastHttpDateFormat.formatDate(long, DateFormat)
---
 java/org/apache/catalina/servlets/WebdavServlet.java     | 6 +++---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java
index 54ef218..ebe86f2 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -2199,7 +2199,7 @@ public class WebdavServlet extends DefaultServlet {
             generatedXML.writeElement("D", "displayname", XMLWriter.CLOSING);
             if (isFile) {
                 generatedXML.writeProperty("D", "getlastmodified",
-                        FastHttpDateFormat.formatDate(lastModified, null));
+                        FastHttpDateFormat.formatDate(lastModified));
                 generatedXML.writeProperty("D", "getcontentlength", Long.toString(contentLength));
                 if (contentType != null) {
                     generatedXML.writeProperty("D", "getcontenttype", contentType);
@@ -2317,7 +2317,7 @@ public class WebdavServlet extends DefaultServlet {
                 } else if (property.equals("getlastmodified")) {
                     if (isFile) {
                         generatedXML.writeProperty("D", "getlastmodified",
-                                FastHttpDateFormat.formatDate(lastModified, null));
+                                FastHttpDateFormat.formatDate(lastModified));
                     } else {
                         propertiesNotFound.addElement(property);
                     }
@@ -2541,7 +2541,7 @@ public class WebdavServlet extends DefaultServlet {
             result.append("\nOwner:");
             result.append(owner);
             result.append("\nExpiration:");
-            result.append(FastHttpDateFormat.formatDate(expiresAt, null));
+            result.append(FastHttpDateFormat.formatDate(expiresAt));
             Enumeration<String> tokensList = tokens.elements();
             while (tokensList.hasMoreElements()) {
                 result.append("\nToken:");
diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 66a767a..11e7f31 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -117,7 +117,10 @@ public final class FastHttpDateFormat {
      * @param threadLocalformat Ignored. The local ConcurrentDateFormat will
      *                          always be used.
      * @return the HTTP date
+     *
+     * @deprecated Unused. This will be removed in Tomcat 10
      */
+    @Deprecated
     public static final String formatDate(long value, DateFormat threadLocalformat) {
         return formatDate(value);
     }


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