This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new b00d6b951a Use new constants
b00d6b951a is described below
commit b00d6b951a060b2a3991ed0b39f36939b2d9b7df
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 19a39946cf..4a470dd936 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -63,6 +63,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;
@@ -178,17 +179,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.
*/
@@ -571,19 +561,19 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
log("[" + method + "] " + path);
}
- if (method.equals(METHOD_PROPFIND)) {
+ if (Method.PROPFIND.equals(method)) {
doPropfind(req, resp);
- } else if (method.equals(METHOD_PROPPATCH)) {
+ } else if (Method.PROPPATCH.equals(method)) {
doProppatch(req, resp);
- } else if (method.equals(METHOD_MKCOL)) {
+ } else if (Method.MKCOL.equals(method)) {
doMkcol(req, resp);
- } else if (method.equals(METHOD_COPY)) {
+ } else if (Method.COPY.equals(method)) {
doCopy(req, resp);
- } else if (method.equals(METHOD_MOVE)) {
+ } else if (Method.MOVE.equals(method)) {
doMove(req, resp);
- } else if (method.equals(METHOD_LOCK)) {
+ } else if (Method.LOCK.equals(method)) {
doLock(req, resp);
- } else if (method.equals(METHOD_UNLOCK)) {
+ } else if (Method.UNLOCK.equals(method)) {
doUnlock(req, resp);
} else {
// DefaultServlet processing
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]