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

commit 26c00de66605e6803079257890f84279d631d970
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Sep 11 12:30:35 2025 +0100

    Use constant for COPY
---
 java/org/apache/coyote/ajp/Constants.java                             | 2 +-
 .../apache/catalina/servlets/TestWebdavServletOptionCollection.java   | 2 +-
 test/org/apache/catalina/servlets/TestWebdavServletOptionsFile.java   | 2 +-
 .../org/apache/catalina/servlets/TestWebdavServletOptionsUnknown.java | 2 +-
 test/org/apache/coyote/ajp/SimpleAjpClient.java                       | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index 12b581be3d..a08c0c68b0 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -107,7 +107,7 @@ public final class Constants {
 
     // Translates integer codes to names of HTTP methods
     private static final String[] methodTransArray =
-            { Method.OPTIONS, Method.GET, Method.HEAD, Method.POST, 
Method.PUT, Method.OPTIONS, Method.TRACE, Method.TRACE, Method.PROPPATCH, 
Method.MKCOL, "COPY",
+            { Method.OPTIONS, Method.GET, Method.HEAD, Method.POST, 
Method.PUT, Method.OPTIONS, Method.TRACE, Method.TRACE, Method.PROPPATCH, 
Method.MKCOL, Method.COPY,
                     "MOVE", "LOCK", "UNLOCK", "ACL", "REPORT", 
"VERSION-CONTROL", "CHECKIN", "CHECKOUT", "UNCHECKOUT",
                     "SEARCH", "MKWORKSPACE", "UPDATE", "LABEL", "MERGE", 
"BASELINE-CONTROL", "MKACTIVITY" };
 
diff --git 
a/test/org/apache/catalina/servlets/TestWebdavServletOptionCollection.java 
b/test/org/apache/catalina/servlets/TestWebdavServletOptionCollection.java
index cfdf82e857..d353a2f466 100644
--- a/test/org/apache/catalina/servlets/TestWebdavServletOptionCollection.java
+++ b/test/org/apache/catalina/servlets/TestWebdavServletOptionCollection.java
@@ -38,7 +38,7 @@ public class TestWebdavServletOptionCollection extends 
ServletOptionsBaseTest {
     @Parameters
     public static Collection<Object[]> inputs() {
         String[] methods = new String[] { Method.GET, Method.POST, 
Method.HEAD, Method.TRACE, Method.PUT, Method.DELETE,
-                Method.MKCOL, "LOCK", "UNLOCK", "COPY", "MOVE", 
Method.PROPFIND, Method.PROPPATCH };
+                Method.MKCOL, "LOCK", "UNLOCK", Method.COPY, "MOVE", 
Method.PROPFIND, Method.PROPPATCH };
 
         List<Object[]> result = new ArrayList<>();
 
diff --git 
a/test/org/apache/catalina/servlets/TestWebdavServletOptionsFile.java 
b/test/org/apache/catalina/servlets/TestWebdavServletOptionsFile.java
index 2dce706ff5..caac6132d1 100644
--- a/test/org/apache/catalina/servlets/TestWebdavServletOptionsFile.java
+++ b/test/org/apache/catalina/servlets/TestWebdavServletOptionsFile.java
@@ -38,7 +38,7 @@ public class TestWebdavServletOptionsFile extends 
ServletOptionsBaseTest {
     @Parameters
     public static Collection<Object[]> inputs() {
         String[] methods = new String[] { Method.GET, Method.POST, 
Method.HEAD, Method.TRACE, Method.PUT, Method.DELETE,
-                Method.MKCOL, "LOCK", "UNLOCK", "COPY", "MOVE", 
Method.PROPFIND, Method.PROPPATCH };
+                Method.MKCOL, "LOCK", "UNLOCK", Method.COPY, "MOVE", 
Method.PROPFIND, Method.PROPPATCH };
 
         List<Object[]> result = new ArrayList<>();
 
diff --git 
a/test/org/apache/catalina/servlets/TestWebdavServletOptionsUnknown.java 
b/test/org/apache/catalina/servlets/TestWebdavServletOptionsUnknown.java
index 322bbbaabd..eaa7b7eaa4 100644
--- a/test/org/apache/catalina/servlets/TestWebdavServletOptionsUnknown.java
+++ b/test/org/apache/catalina/servlets/TestWebdavServletOptionsUnknown.java
@@ -38,7 +38,7 @@ public class TestWebdavServletOptionsUnknown extends 
ServletOptionsBaseTest {
     @Parameters
     public static Collection<Object[]> inputs() {
         String[] methods = new String[] { Method.GET, Method.POST, 
Method.HEAD, Method.TRACE, Method.PUT, Method.DELETE,
-                Method.MKCOL, "LOCK", "UNLOCK", "COPY", "MOVE", 
Method.PROPFIND, Method.PROPPATCH };
+                Method.MKCOL, "LOCK", "UNLOCK", Method.COPY, "MOVE", 
Method.PROPFIND, Method.PROPPATCH };
 
         List<Object[]> result = new ArrayList<>();
 
diff --git a/test/org/apache/coyote/ajp/SimpleAjpClient.java 
b/test/org/apache/coyote/ajp/SimpleAjpClient.java
index 040e5be9d8..8dda78532b 100644
--- a/test/org/apache/coyote/ajp/SimpleAjpClient.java
+++ b/test/org/apache/coyote/ajp/SimpleAjpClient.java
@@ -106,7 +106,7 @@ public class SimpleAjpClient {
             case Method.MKCOL:
                 this.method = 10;
                 break;
-            case "COPY":
+            case Method.COPY:
                 this.method = 11;
                 break;
             case "MOVE":
@@ -185,7 +185,7 @@ public class SimpleAjpClient {
             case 10:
                 return Method.MKCOL;
             case 11:
-                return "COPY";
+                return Method.COPY;
             case 12:
                 return "MOVE";
             case 13:


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

Reply via email to