This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 0e36302d15 Simplify
0e36302d15 is described below
commit 0e36302d1571c909223936f3a750c709e8ffd6fb
Author: Mark Thomas <[email protected]>
AuthorDate: Fri May 1 14:50:52 2026 +0100
Simplify
---
java/org/apache/catalina/realm/RealmBase.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/realm/RealmBase.java
b/java/org/apache/catalina/realm/RealmBase.java
index 4dc52e2656..a6b7ca725b 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -669,7 +669,6 @@ public abstract class RealmBase extends LifecycleMBeanBase
implements Realm {
}
boolean matched = false;
- int pos = -1;
for (int k = 0; k < patterns.length && !matched; k++) {
String pattern = patterns[k];
if (pattern.startsWith("*.")) {
@@ -679,14 +678,13 @@ public abstract class RealmBase extends
LifecycleMBeanBase implements Realm {
uri.length() - dot == pattern.length() - 1) {
if (pattern.regionMatches(1, uri, dot,
uri.length() - dot)) {
matched = true;
- pos = j;
}
}
}
}
if (matched) {
found = true;
- if (collection[pos].findMethod(method)) {
+ if (collection[j].findMethod(method)) {
if (results == null) {
results = new ArrayList<>();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]