You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "markt-asf (via GitHub)" <gi...@apache.org> on 2023/02/02 17:20:27 UTC

[GitHub] [tomcat] markt-asf commented on a diff in pull request #581: Speedup by removing non pattern replaceAll with constant arg

markt-asf commented on code in PR #581:
URL: https://github.com/apache/tomcat/pull/581#discussion_r1094835289


##########
java/org/apache/tomcat/buildutil/translate/Utils.java:
##########
@@ -123,7 +123,7 @@ static String formatValueCommon(String in) {
 
         result = ESCAPE_LEADING_SPACE.matcher(result).replaceAll("\\\\$1");
 
-        result = result.replaceAll("\t", "\\t");
+        result = result.replace("\t", "t");
 

Review Comment:
   This is not correct. The literal (unescaped) replacement text should be `\t`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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