This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 8fbc654 Improve Catalina class loader repositories regular expression 8fbc654 is described below commit 8fbc654b9a8c1b8943c3b16add342104ccd7b19a Author: Paul Muriel Biya-Bi <paulmuriel.biy...@gmail.com> AuthorDate: Tue Apr 7 10:20:15 2020 -0400 Improve Catalina class loader repositories regular expression The goal of this enhancement is to improve the regular expression used for searching class loader repositories when bootstrapping Catalina. With the Java regular expression engine which is regex-directed, we gain in performance by using the negated character class [^\"]* rather than the lazy quantifier .*? in the regular expression used for searching class loader repositories when bootstrapping Catalina. https://bz.apache.org/bugzilla/show_bug.cgi?id=64309 --- java/org/apache/catalina/startup/Bootstrap.java | 2 +- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/startup/Bootstrap.java b/java/org/apache/catalina/startup/Bootstrap.java index d3f25a5..1497e41 100644 --- a/java/org/apache/catalina/startup/Bootstrap.java +++ b/java/org/apache/catalina/startup/Bootstrap.java @@ -59,7 +59,7 @@ public final class Bootstrap { private static final File catalinaBaseFile; private static final File catalinaHomeFile; - private static final Pattern PATH_PATTERN = Pattern.compile("(\".*?\")|(([^,])*)"); + private static final Pattern PATH_PATTERN = Pattern.compile("(\"[^\"]*\")|(([^,])*)"); static { // Will always be non-null diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 4a29e3f..039009a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -73,6 +73,11 @@ Add more descriptive error message in DefaultServlet for SC_NOT_FOUND. (michaelo) </add> + <fix> + <bug>64309</bug>; Improve the regular expression used to search for + class loader repositories when bootstrapping Tomcat. Pull request + provided by Paul Muriel Biya-Bi. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org