You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/04/22 09:29:47 UTC
[tomcat] branch 9.0.x updated: Improve Catalina class loader
repositories regular expression
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 67f0aec Improve Catalina class loader repositories regular expression
67f0aec is described below
commit 67f0aecbfcf835e0a5e08ab20fc75cabad126f32
Author: Paul Muriel Biya-Bi <pa...@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.
---
java/org/apache/catalina/startup/Bootstrap.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/startup/Bootstrap.java b/java/org/apache/catalina/startup/Bootstrap.java
index 08ad013..90e3c98 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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org