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 6e0fc8d8f7 Remove unnecessary code. pos is always updated again before 
next use
6e0fc8d8f7 is described below

commit 6e0fc8d8f7ca4653d3e187530c28283a20e003e9
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 4 22:02:40 2023 +0100

    Remove unnecessary code. pos is always updated again before next use
---
 java/org/apache/catalina/valves/rewrite/Substitution.java | 2 --
 1 file changed, 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/Substitution.java 
b/java/org/apache/catalina/valves/rewrite/Substitution.java
index 2fa3e8d8a7..1e70de2fcd 100644
--- a/java/org/apache/catalina/valves/rewrite/Substitution.java
+++ b/java/org/apache/catalina/valves/rewrite/Substitution.java
@@ -163,7 +163,6 @@ public class Substitution {
                     // Static text
                     StaticElement newElement = new StaticElement();
                     newElement.value = sub.substring(pos, dollarPos);
-                    pos = dollarPos;
                     elements.add(newElement);
                 }
                 if (Character.isDigit(sub.charAt(dollarPos + 1))) {
@@ -215,7 +214,6 @@ public class Substitution {
                     // Static text
                     StaticElement newElement = new StaticElement();
                     newElement.value = sub.substring(pos, percentPos);
-                    pos = percentPos;
                     elements.add(newElement);
                 }
                 if (Character.isDigit(sub.charAt(percentPos + 1))) {


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

Reply via email to