This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new ff025fa886 Use new constants
ff025fa886 is described below
commit ff025fa8869359fb796e877f4c80be83cb4b3e30
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 11 12:26:19 2025 +0100
Use new constants
---
.../apache/catalina/servlets/WebdavServlet.java | 26 +++++++---------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 828a1222f8..09d8fa6b68 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -64,6 +64,7 @@ import org.apache.tomcat.PeriodicEventListener;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.http.ConcurrentDateFormat;
import org.apache.tomcat.util.http.FastHttpDateFormat;
+import org.apache.tomcat.util.http.Method;
import org.apache.tomcat.util.http.RequestUtil;
import org.apache.tomcat.util.http.WebdavIfHeader;
import org.w3c.dom.Document;
@@ -180,17 +181,6 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
private static final long serialVersionUID = 1L;
- // -------------------------------------------------------------- Constants
-
- private static final String METHOD_PROPFIND = "PROPFIND";
- private static final String METHOD_PROPPATCH = "PROPPATCH";
- private static final String METHOD_MKCOL = "MKCOL";
- private static final String METHOD_COPY = "COPY";
- private static final String METHOD_MOVE = "MOVE";
- private static final String METHOD_LOCK = "LOCK";
- private static final String METHOD_UNLOCK = "UNLOCK";
-
-
/**
* Default lock timeout value.
*/
@@ -574,13 +564,13 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
}
switch (method) {
- case METHOD_PROPFIND -> doPropfind(req, resp);
- case METHOD_PROPPATCH -> doProppatch(req, resp);
- case METHOD_MKCOL -> doMkcol(req, resp);
- case METHOD_COPY -> doCopy(req, resp);
- case METHOD_MOVE -> doMove(req, resp);
- case METHOD_LOCK -> doLock(req, resp);
- case METHOD_UNLOCK -> doUnlock(req, resp);
+ case Method.PROPFIND -> doPropfind(req, resp);
+ case Method.PROPPATCH -> doProppatch(req, resp);
+ case Method.MKCOL -> doMkcol(req, resp);
+ case Method.COPY -> doCopy(req, resp);
+ case Method.MOVE -> doMove(req, resp);
+ case Method.LOCK -> doLock(req, resp);
+ case Method.UNLOCK -> doUnlock(req, resp);
// DefaultServlet processing
default -> super.service(req, resp);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]