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

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

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

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

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 4c59ac2..ef5573d 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -2068,7 +2068,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);
@@ -2152,7 +2152,7 @@ public class WebdavServlet extends DefaultServlet {
                 String property = properties.nextElement();
 
                 if (property.equals("creationdate")) {
-                    generatedXML.writeProperty ("D", "creationdate", 
getISOCreationDate(created));
+                    generatedXML.writeProperty("D", "creationdate", 
getISOCreationDate(created));
                 } else if (property.equals("displayname")) {
                     generatedXML.writeElement("D", "displayname", 
XMLWriter.OPENING);
                     generatedXML.writeData(resourceName);
@@ -2186,7 +2186,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);
                     }
@@ -2405,7 +2405,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 dd9bd2b..ee7f780 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to