svn commit: r77994 - in /release/tomcat/tomcat-9: v9.0.105/ v9.0.106/
Author: remm Date: Mon Jul 7 07:36:51 2025 New Revision: 77994 Log: Drop old releases Removed: release/tomcat/tomcat-9/v9.0.105/ release/tomcat/tomcat-9/v9.0.106/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Avoid NPE for default
This is an automated email from the ASF dual-hosted git repository. remm 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 c5ec45d627 Avoid NPE for default c5ec45d627 is described below commit c5ec45d62732e34cee41638295185f382cf502db Author: remm AuthorDate: Mon Jul 7 10:44:22 2025 +0200 Avoid NPE for default Found by Coverity. --- java/org/apache/catalina/valves/AbstractAccessLogValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/valves/AbstractAccessLogValve.java b/java/org/apache/catalina/valves/AbstractAccessLogValve.java index 63d85c7490..c320c90433 100644 --- a/java/org/apache/catalina/valves/AbstractAccessLogValve.java +++ b/java/org/apache/catalina/valves/AbstractAccessLogValve.java @@ -1687,7 +1687,7 @@ public abstract class AbstractAccessLogValve extends ValveBase implements Access private final IdentifierType identifierType; public IdentifierElement() { -this(null); +this(""); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Improve concurrency resistance
This is an automated email from the ASF dual-hosted git repository. remm 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 148d642d0c Improve concurrency resistance 148d642d0c is described below commit 148d642d0ca484bf471fab38bc51b6db7fa5f08f Author: remm AuthorDate: Mon Jul 7 11:30:53 2025 +0200 Improve concurrency resistance Found by Coverity. --- .../coyote/http11/filters/ChunkedInputFilter.java | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java index 75d6efa546..6b15e3260a 100644 --- a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java +++ b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; import org.apache.coyote.ActionCode; import org.apache.coyote.BadRequestException; @@ -108,7 +109,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler private volatile boolean crFound = false; private volatile int chunkSizeDigitsRead = 0; private volatile boolean parsingExtension = false; -private volatile long extensionSize; +private final AtomicLong extensionSize = new AtomicLong(0); private final HttpHeaderParser httpHeaderParser; // --- Constructors @@ -253,7 +254,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler crFound = false; chunkSizeDigitsRead = 0; parsingExtension = false; -extensionSize = 0; +extensionSize.set(0); httpHeaderParser.recycle(); } @@ -367,7 +368,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -381,8 +382,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { throwBadRequestException(sm.getString("chunkedInputFilter.maxExtension")); } } @@ -430,7 +431,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -444,8 +445,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { return false; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Improve concurrency resistance
This is an automated email from the ASF dual-hosted git repository. remm 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 f6cb082910 Improve concurrency resistance f6cb082910 is described below commit f6cb082910868d7821e18cc16af8b96a4a3207d7 Author: remm AuthorDate: Mon Jul 7 11:30:53 2025 +0200 Improve concurrency resistance Found by Coverity. --- .../coyote/http11/filters/ChunkedInputFilter.java | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java index 75d6efa546..6b15e3260a 100644 --- a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java +++ b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; import org.apache.coyote.ActionCode; import org.apache.coyote.BadRequestException; @@ -108,7 +109,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler private volatile boolean crFound = false; private volatile int chunkSizeDigitsRead = 0; private volatile boolean parsingExtension = false; -private volatile long extensionSize; +private final AtomicLong extensionSize = new AtomicLong(0); private final HttpHeaderParser httpHeaderParser; // --- Constructors @@ -253,7 +254,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler crFound = false; chunkSizeDigitsRead = 0; parsingExtension = false; -extensionSize = 0; +extensionSize.set(0); httpHeaderParser.recycle(); } @@ -367,7 +368,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -381,8 +382,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { throwBadRequestException(sm.getString("chunkedInputFilter.maxExtension")); } } @@ -430,7 +431,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -444,8 +445,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { return false; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Unlikely NPE
This is an automated email from the ASF dual-hosted git repository. remm 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 8811b3447b Unlikely NPE 8811b3447b is described below commit 8811b3447b81ea3c53ccb209e8a2b2aa15652caa Author: remm AuthorDate: Mon Jul 7 10:20:54 2025 +0200 Unlikely NPE Found by Coverity. --- java/org/apache/catalina/loader/WebappClassLoaderBase.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java b/java/org/apache/catalina/loader/WebappClassLoaderBase.java index 70c47b75a4..0fee5e56df 100644 --- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java +++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java @@ -2344,7 +2344,11 @@ public abstract class WebappClassLoaderBase extends URLClassLoader if (pkg != null) { boolean sealCheck = true; if (pkg.isSealed()) { -sealCheck = pkg.isSealed(codeBase); +if(codeBase != null) { +sealCheck = pkg.isSealed(codeBase); +} else { +sealCheck = false; +} } else { sealCheck = manifest == null || !isPackageSealed(packageName, manifest); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Unlikely NPE
This is an automated email from the ASF dual-hosted git repository. remm 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 e58b007f8c Unlikely NPE e58b007f8c is described below commit e58b007f8c0563be26ba2e7fc0c4fd0c8fe32949 Author: remm AuthorDate: Mon Jul 7 10:20:54 2025 +0200 Unlikely NPE Found by Coverity. --- java/org/apache/catalina/loader/WebappClassLoaderBase.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java b/java/org/apache/catalina/loader/WebappClassLoaderBase.java index 5d9d98aa9e..ccbbc5f976 100644 --- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java +++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java @@ -2327,7 +2327,11 @@ public abstract class WebappClassLoaderBase extends URLClassLoader if (pkg != null) { boolean sealCheck = true; if (pkg.isSealed()) { -sealCheck = pkg.isSealed(codeBase); +if(codeBase != null) { +sealCheck = pkg.isSealed(codeBase); +} else { +sealCheck = false; +} } else { sealCheck = manifest == null || !isPackageSealed(packageName, manifest); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Improve stats thread safety
This is an automated email from the ASF dual-hosted git repository. remm 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 fdf8560eac Improve stats thread safety fdf8560eac is described below commit fdf8560eac2f7aeeb73cc474765faca95c661a97 Author: remm AuthorDate: Mon Jul 7 16:04:06 2025 +0200 Improve stats thread safety Also add a flag to disable them. Found a long time ago by Coverity. --- .../apache/catalina/ha/session/DeltaManager.java | 208 + webapps/docs/changelog.xml | 4 + webapps/docs/config/cluster-manager.xml| 4 + 3 files changed, 140 insertions(+), 76 deletions(-) diff --git a/java/org/apache/catalina/ha/session/DeltaManager.java b/java/org/apache/catalina/ha/session/DeltaManager.java index 81746c26a8..53df6acc43 100644 --- a/java/org/apache/catalina/ha/session/DeltaManager.java +++ b/java/org/apache/catalina/ha/session/DeltaManager.java @@ -23,6 +23,8 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Date; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; import org.apache.catalina.Engine; import org.apache.catalina.Host; @@ -76,6 +78,7 @@ public class DeltaManager extends ClusterManagerBase { private int stateTransferTimeout = 60; private boolean sendAllSessions = true; private int sendAllSessionsSize = 1000; +private boolean enableStatistics = true; /** * wait time between send session block (default 2 sec) @@ -88,25 +91,25 @@ public class DeltaManager extends ClusterManagerBase { // stats attributes -private volatile long sessionReplaceCounter = 0; -private volatile long counterReceive_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterReceive_EVT_ALL_SESSION_DATA = 0; -private volatile long counterReceive_EVT_SESSION_CREATED = 0; -private volatile long counterReceive_EVT_SESSION_EXPIRED = 0; -private volatile long counterReceive_EVT_SESSION_ACCESSED = 0; -private volatile long counterReceive_EVT_SESSION_DELTA = 0; -private volatile int counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterReceive_EVT_CHANGE_SESSION_ID = 0; -private volatile long counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = 0; -private volatile long counterSend_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterSend_EVT_ALL_SESSION_DATA = 0; -private volatile long counterSend_EVT_SESSION_CREATED = 0; -private volatile long counterSend_EVT_SESSION_DELTA = 0; -private volatile long counterSend_EVT_SESSION_ACCESSED = 0; -private volatile long counterSend_EVT_SESSION_EXPIRED = 0; -private volatile int counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterSend_EVT_CHANGE_SESSION_ID = 0; -private volatile int counterNoStateTransferred = 0; +private final AtomicLong sessionReplaceCounter = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicInteger counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterReceive_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = new AtomicLong(0); +private final AtomicLong counterSend_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterSend_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicInteger counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterSend_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicInteger counterNoStateTransferred = new AtomicInteger(0); // - Constructor @@ -130,98 +133,98 @@ public class DeltaManager extends ClusterManagerBase { * @return Returns the
(tomcat) branch 11.0.x updated: Improve stats thread safety
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 57256efc7f Improve stats thread safety 57256efc7f is described below commit 57256efc7f6a52a7a4c3662c662bf723fb27b17f Author: remm AuthorDate: Mon Jul 7 16:04:06 2025 +0200 Improve stats thread safety Also add a flag to disable them. Found a long time ago by Coverity. --- .../apache/catalina/ha/session/DeltaManager.java | 208 + webapps/docs/changelog.xml | 8 + webapps/docs/config/cluster-manager.xml| 4 + 3 files changed, 144 insertions(+), 76 deletions(-) diff --git a/java/org/apache/catalina/ha/session/DeltaManager.java b/java/org/apache/catalina/ha/session/DeltaManager.java index 81746c26a8..53df6acc43 100644 --- a/java/org/apache/catalina/ha/session/DeltaManager.java +++ b/java/org/apache/catalina/ha/session/DeltaManager.java @@ -23,6 +23,8 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Date; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; import org.apache.catalina.Engine; import org.apache.catalina.Host; @@ -76,6 +78,7 @@ public class DeltaManager extends ClusterManagerBase { private int stateTransferTimeout = 60; private boolean sendAllSessions = true; private int sendAllSessionsSize = 1000; +private boolean enableStatistics = true; /** * wait time between send session block (default 2 sec) @@ -88,25 +91,25 @@ public class DeltaManager extends ClusterManagerBase { // stats attributes -private volatile long sessionReplaceCounter = 0; -private volatile long counterReceive_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterReceive_EVT_ALL_SESSION_DATA = 0; -private volatile long counterReceive_EVT_SESSION_CREATED = 0; -private volatile long counterReceive_EVT_SESSION_EXPIRED = 0; -private volatile long counterReceive_EVT_SESSION_ACCESSED = 0; -private volatile long counterReceive_EVT_SESSION_DELTA = 0; -private volatile int counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterReceive_EVT_CHANGE_SESSION_ID = 0; -private volatile long counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = 0; -private volatile long counterSend_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterSend_EVT_ALL_SESSION_DATA = 0; -private volatile long counterSend_EVT_SESSION_CREATED = 0; -private volatile long counterSend_EVT_SESSION_DELTA = 0; -private volatile long counterSend_EVT_SESSION_ACCESSED = 0; -private volatile long counterSend_EVT_SESSION_EXPIRED = 0; -private volatile int counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterSend_EVT_CHANGE_SESSION_ID = 0; -private volatile int counterNoStateTransferred = 0; +private final AtomicLong sessionReplaceCounter = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicInteger counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterReceive_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = new AtomicLong(0); +private final AtomicLong counterSend_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterSend_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicInteger counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterSend_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicInteger counterNoStateTransferred = new AtomicInteger(0); // - Constructor @@ -130,98 +133,98 @@ public class DeltaManager extends ClusterManagerBase { * @return Returns
(tomcat) branch 10.1.x updated: Improve stats thread safety
This is an automated email from the ASF dual-hosted git repository. remm 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 1e40ec20dc Improve stats thread safety 1e40ec20dc is described below commit 1e40ec20dc3074d6165dc8cd2a218c84d2f40857 Author: remm AuthorDate: Mon Jul 7 16:04:06 2025 +0200 Improve stats thread safety Also add a flag to disable them. Found a long time ago by Coverity. --- .../apache/catalina/ha/session/DeltaManager.java | 208 + webapps/docs/changelog.xml | 8 + webapps/docs/config/cluster-manager.xml| 4 + 3 files changed, 144 insertions(+), 76 deletions(-) diff --git a/java/org/apache/catalina/ha/session/DeltaManager.java b/java/org/apache/catalina/ha/session/DeltaManager.java index cf4ace54cf..59e00e0d51 100644 --- a/java/org/apache/catalina/ha/session/DeltaManager.java +++ b/java/org/apache/catalina/ha/session/DeltaManager.java @@ -23,6 +23,8 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Date; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; import org.apache.catalina.Engine; import org.apache.catalina.Host; @@ -76,6 +78,7 @@ public class DeltaManager extends ClusterManagerBase { private int stateTransferTimeout = 60; private boolean sendAllSessions = true; private int sendAllSessionsSize = 1000; +private boolean enableStatistics = true; /** * wait time between send session block (default 2 sec) @@ -88,25 +91,25 @@ public class DeltaManager extends ClusterManagerBase { // stats attributes -private volatile long sessionReplaceCounter = 0; -private volatile long counterReceive_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterReceive_EVT_ALL_SESSION_DATA = 0; -private volatile long counterReceive_EVT_SESSION_CREATED = 0; -private volatile long counterReceive_EVT_SESSION_EXPIRED = 0; -private volatile long counterReceive_EVT_SESSION_ACCESSED = 0; -private volatile long counterReceive_EVT_SESSION_DELTA = 0; -private volatile int counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterReceive_EVT_CHANGE_SESSION_ID = 0; -private volatile long counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = 0; -private volatile long counterSend_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterSend_EVT_ALL_SESSION_DATA = 0; -private volatile long counterSend_EVT_SESSION_CREATED = 0; -private volatile long counterSend_EVT_SESSION_DELTA = 0; -private volatile long counterSend_EVT_SESSION_ACCESSED = 0; -private volatile long counterSend_EVT_SESSION_EXPIRED = 0; -private volatile int counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterSend_EVT_CHANGE_SESSION_ID = 0; -private volatile int counterNoStateTransferred = 0; +private final AtomicLong sessionReplaceCounter = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicInteger counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterReceive_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = new AtomicLong(0); +private final AtomicLong counterSend_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterSend_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicInteger counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterSend_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicInteger counterNoStateTransferred = new AtomicInteger(0); // - Constructor @@ -130,98 +133,98 @@ public class DeltaManager extends ClusterManagerBase { * @return Returns
(tomcat) branch 9.0.x updated: Improve stats thread safety
This is an automated email from the ASF dual-hosted git repository. remm 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 baa373a469 Improve stats thread safety baa373a469 is described below commit baa373a469c343a7267faadc5ad941779ffcf863 Author: remm AuthorDate: Mon Jul 7 16:04:06 2025 +0200 Improve stats thread safety Also add a flag to disable them. Found a long time ago by Coverity. --- .../apache/catalina/ha/session/DeltaManager.java | 208 + webapps/docs/changelog.xml | 8 + webapps/docs/config/cluster-manager.xml| 4 + 3 files changed, 144 insertions(+), 76 deletions(-) diff --git a/java/org/apache/catalina/ha/session/DeltaManager.java b/java/org/apache/catalina/ha/session/DeltaManager.java index 9aeebd0d12..50a1eb6397 100644 --- a/java/org/apache/catalina/ha/session/DeltaManager.java +++ b/java/org/apache/catalina/ha/session/DeltaManager.java @@ -23,6 +23,8 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Date; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; import org.apache.catalina.Engine; import org.apache.catalina.Host; @@ -76,6 +78,7 @@ public class DeltaManager extends ClusterManagerBase { private int stateTransferTimeout = 60; private boolean sendAllSessions = true; private int sendAllSessionsSize = 1000; +private boolean enableStatistics = true; /** * wait time between send session block (default 2 sec) @@ -88,25 +91,25 @@ public class DeltaManager extends ClusterManagerBase { // stats attributes -private volatile long sessionReplaceCounter = 0; -private volatile long counterReceive_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterReceive_EVT_ALL_SESSION_DATA = 0; -private volatile long counterReceive_EVT_SESSION_CREATED = 0; -private volatile long counterReceive_EVT_SESSION_EXPIRED = 0; -private volatile long counterReceive_EVT_SESSION_ACCESSED = 0; -private volatile long counterReceive_EVT_SESSION_DELTA = 0; -private volatile int counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterReceive_EVT_CHANGE_SESSION_ID = 0; -private volatile long counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = 0; -private volatile long counterSend_EVT_GET_ALL_SESSIONS = 0; -private volatile long counterSend_EVT_ALL_SESSION_DATA = 0; -private volatile long counterSend_EVT_SESSION_CREATED = 0; -private volatile long counterSend_EVT_SESSION_DELTA = 0; -private volatile long counterSend_EVT_SESSION_ACCESSED = 0; -private volatile long counterSend_EVT_SESSION_EXPIRED = 0; -private volatile int counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0; -private volatile long counterSend_EVT_CHANGE_SESSION_ID = 0; -private volatile int counterNoStateTransferred = 0; +private final AtomicLong sessionReplaceCounter = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicInteger counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterReceive_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicLong counterReceive_EVT_ALL_SESSION_NOCONTEXTMANAGER = new AtomicLong(0); +private final AtomicLong counterSend_EVT_GET_ALL_SESSIONS = new AtomicLong(0); +private final AtomicLong counterSend_EVT_ALL_SESSION_DATA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_CREATED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_DELTA = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_ACCESSED = new AtomicLong(0); +private final AtomicLong counterSend_EVT_SESSION_EXPIRED = new AtomicLong(0); +private final AtomicInteger counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = new AtomicInteger(0); +private final AtomicLong counterSend_EVT_CHANGE_SESSION_ID = new AtomicLong(0); +private final AtomicInteger counterNoStateTransferred = new AtomicInteger(0); // - Constructor @@ -130,98 +133,98 @@ public class DeltaManager extends ClusterManagerBase { * @return Returns th
(tomcat) branch main updated: Improve concurrency resistance
This is an automated email from the ASF dual-hosted git repository. remm 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 82856e9328 Improve concurrency resistance 82856e9328 is described below commit 82856e932821ec56bec4751ef60b7fb179c8b316 Author: remm AuthorDate: Mon Jul 7 11:30:53 2025 +0200 Improve concurrency resistance Found by Coverity. --- .../coyote/http11/filters/ChunkedInputFilter.java | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java index 75d6efa546..6b15e3260a 100644 --- a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java +++ b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; import org.apache.coyote.ActionCode; import org.apache.coyote.BadRequestException; @@ -108,7 +109,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler private volatile boolean crFound = false; private volatile int chunkSizeDigitsRead = 0; private volatile boolean parsingExtension = false; -private volatile long extensionSize; +private final AtomicLong extensionSize = new AtomicLong(0); private final HttpHeaderParser httpHeaderParser; // --- Constructors @@ -253,7 +254,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler crFound = false; chunkSizeDigitsRead = 0; parsingExtension = false; -extensionSize = 0; +extensionSize.set(0); httpHeaderParser.recycle(); } @@ -367,7 +368,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -381,8 +382,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { throwBadRequestException(sm.getString("chunkedInputFilter.maxExtension")); } } @@ -430,7 +431,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -444,8 +445,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { return false; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Improve concurrency resistance
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new f108985523 Improve concurrency resistance f108985523 is described below commit f1089855236e63733c34b87c05cc1907107de8c1 Author: remm AuthorDate: Mon Jul 7 11:30:53 2025 +0200 Improve concurrency resistance Found by Coverity. --- .../coyote/http11/filters/ChunkedInputFilter.java | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java index 75d6efa546..6b15e3260a 100644 --- a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java +++ b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; import org.apache.coyote.ActionCode; import org.apache.coyote.BadRequestException; @@ -108,7 +109,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler private volatile boolean crFound = false; private volatile int chunkSizeDigitsRead = 0; private volatile boolean parsingExtension = false; -private volatile long extensionSize; +private final AtomicLong extensionSize = new AtomicLong(0); private final HttpHeaderParser httpHeaderParser; // --- Constructors @@ -253,7 +254,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler crFound = false; chunkSizeDigitsRead = 0; parsingExtension = false; -extensionSize = 0; +extensionSize.set(0); httpHeaderParser.recycle(); } @@ -367,7 +368,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -381,8 +382,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { throwBadRequestException(sm.getString("chunkedInputFilter.maxExtension")); } } @@ -430,7 +431,7 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // semicolons may appear to separate multiple chunk-extensions. // These need to be processed as part of parsing the extensions. parsingExtension = true; -extensionSize++; +extensionSize.incrementAndGet(); } else if (!parsingExtension) { int charValue = HexUtils.getDec(chr); if (charValue != -1 && chunkSizeDigitsRead < 8) { @@ -444,8 +445,8 @@ public class ChunkedInputFilter implements InputFilter, ApplicationBufferHandler // Extension 'parsing' // Note that the chunk-extension is neither parsed nor // validated. Currently it is simply ignored. -extensionSize++; -if (maxExtensionSize > -1 && extensionSize > maxExtensionSize) { +long extSize = extensionSize.incrementAndGet(); +if (maxExtensionSize > -1 && extSize > maxExtensionSize) { return false; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Fix issue returning null for no args, which would cause a NPE
This is an automated email from the ASF dual-hosted git repository. remm 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 07b5c179da Fix issue returning null for no args, which would cause a NPE 07b5c179da is described below commit 07b5c179da0d9d22cc9433abd4a0c1a368252381 Author: remm AuthorDate: Mon Jul 7 14:01:20 2025 +0200 Fix issue returning null for no args, which would cause a NPE Although the comment says that this duplicates jakarta.el.Util, this does not seem to be exactly the case. All paths should throw MethodNotFoundException instead of returning null. In jakarta.el.Util all callers are expecting null instead, so it works fine. Found by Coverity. --- java/org/apache/el/util/ReflectionUtil.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/el/util/ReflectionUtil.java b/java/org/apache/el/util/ReflectionUtil.java index ae3095a115..e8936efaf5 100644 --- a/java/org/apache/el/util/ReflectionUtil.java +++ b/java/org/apache/el/util/ReflectionUtil.java @@ -153,12 +153,20 @@ public class ReflectionUtil { // Fast path: when no arguments exist, there can only be one matching method and no need for coercion. if (paramCount == 0) { +Method result = null; +Throwable t = null; try { Method method = clazz.getMethod(methodName, paramTypes); -return getMethod(clazz, base, method); +result = getMethod(clazz, base, method); } catch (NoSuchMethodException | SecurityException e) { -// Fall through to broader, slower logic +// Fall through +t = e; } +if (result == null) { +throw new MethodNotFoundException( +MessageFactory.get("error.method.notfound", base, property, paramString(paramTypes)), t); +} +return result; } Method[] methods = clazz.getMethods(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Fix issue returning null for no args, which would cause a NPE
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new ae2ffdccc4 Fix issue returning null for no args, which would cause a NPE ae2ffdccc4 is described below commit ae2ffdccc485e92adfd137a908715d49c90d62e7 Author: remm AuthorDate: Mon Jul 7 14:01:20 2025 +0200 Fix issue returning null for no args, which would cause a NPE Although the comment says that this duplicates jakarta.el.Util, this does not seem to be exactly the case. All paths should throw MethodNotFoundException instead of returning null. In jakarta.el.Util all callers are expecting null instead, so it works fine. Found by Coverity. --- java/org/apache/el/util/ReflectionUtil.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/el/util/ReflectionUtil.java b/java/org/apache/el/util/ReflectionUtil.java index ae3095a115..e8936efaf5 100644 --- a/java/org/apache/el/util/ReflectionUtil.java +++ b/java/org/apache/el/util/ReflectionUtil.java @@ -153,12 +153,20 @@ public class ReflectionUtil { // Fast path: when no arguments exist, there can only be one matching method and no need for coercion. if (paramCount == 0) { +Method result = null; +Throwable t = null; try { Method method = clazz.getMethod(methodName, paramTypes); -return getMethod(clazz, base, method); +result = getMethod(clazz, base, method); } catch (NoSuchMethodException | SecurityException e) { -// Fall through to broader, slower logic +// Fall through +t = e; } +if (result == null) { +throw new MethodNotFoundException( +MessageFactory.get("error.method.notfound", base, property, paramString(paramTypes)), t); +} +return result; } Method[] methods = clazz.getMethods(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Fix issue returning null for no args, which would cause a NPE
This is an automated email from the ASF dual-hosted git repository. remm 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 026256111f Fix issue returning null for no args, which would cause a NPE 026256111f is described below commit 026256111f0c1f7855d52be3ac9139bdd463e21c Author: remm AuthorDate: Mon Jul 7 14:01:20 2025 +0200 Fix issue returning null for no args, which would cause a NPE Although the comment says that this duplicates jakarta.el.Util, this does not seem to be exactly the case. All paths should throw MethodNotFoundException instead of returning null. In jakarta.el.Util all callers are expecting null instead, so it works fine. Found by Coverity. --- java/org/apache/el/util/ReflectionUtil.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/el/util/ReflectionUtil.java b/java/org/apache/el/util/ReflectionUtil.java index fce0396320..6d0ed432ca 100644 --- a/java/org/apache/el/util/ReflectionUtil.java +++ b/java/org/apache/el/util/ReflectionUtil.java @@ -155,12 +155,20 @@ public class ReflectionUtil { // Fast path: when no arguments exist, there can only be one matching method and no need for coercion. if (paramCount == 0) { +Method result = null; +Throwable t = null; try { Method method = clazz.getMethod(methodName, paramTypes); -return getMethod(clazz, base, method); +result = getMethod(clazz, base, method); } catch (NoSuchMethodException | SecurityException e) { -// Fall through to broader, slower logic +// Fall through +t = e; } +if (result == null) { +throw new MethodNotFoundException( +MessageFactory.get("error.method.notfound", base, property, paramString(paramTypes)), t); +} +return result; } Method[] methods = clazz.getMethods(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Fix issue returning null for no args, which would cause a NPE
This is an automated email from the ASF dual-hosted git repository. remm 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 068e779df9 Fix issue returning null for no args, which would cause a NPE 068e779df9 is described below commit 068e779df92a4fe7fff775212daf51dd2b848c20 Author: remm AuthorDate: Mon Jul 7 14:01:20 2025 +0200 Fix issue returning null for no args, which would cause a NPE Although the comment says that this duplicates jakarta.el.Util, this does not seem to be exactly the case. All paths should throw MethodNotFoundException instead of returning null. In jakarta.el.Util all callers are expecting null instead, so it works fine. Found by Coverity. --- java/org/apache/el/util/ReflectionUtil.java | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/el/util/ReflectionUtil.java b/java/org/apache/el/util/ReflectionUtil.java index 6f662f30e8..82866fce98 100644 --- a/java/org/apache/el/util/ReflectionUtil.java +++ b/java/org/apache/el/util/ReflectionUtil.java @@ -155,12 +155,20 @@ public class ReflectionUtil { // Fast path: when no arguments exist, there can only be one matching method and no need for coercion. if (paramCount == 0) { +Method result = null; +Throwable t = null; try { Method method = clazz.getMethod(methodName, paramTypes); -return getMethod(clazz, base, method); +result = getMethod(clazz, base, method); } catch (NoSuchMethodException | SecurityException e) { -// Fall through to broader, slower logic +// Fall through +t = e; } +if (result == null) { +throw new MethodNotFoundException( +MessageFactory.get("error.method.notfound", base, property, paramString(paramTypes)), t); +} +return result; } Method[] methods = clazz.getMethods(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Avoid NPE for default
This is an automated email from the ASF dual-hosted git repository. remm 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 0d3e680e3a Avoid NPE for default 0d3e680e3a is described below commit 0d3e680e3ae18c7e7ff3ce4f9695ee7dad3432d8 Author: remm AuthorDate: Mon Jul 7 10:44:22 2025 +0200 Avoid NPE for default Found by Coverity. --- java/org/apache/catalina/valves/AbstractAccessLogValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/valves/AbstractAccessLogValve.java b/java/org/apache/catalina/valves/AbstractAccessLogValve.java index 7370a49af5..e25eabf3fb 100644 --- a/java/org/apache/catalina/valves/AbstractAccessLogValve.java +++ b/java/org/apache/catalina/valves/AbstractAccessLogValve.java @@ -1691,7 +1691,7 @@ public abstract class AbstractAccessLogValve extends ValveBase implements Access private final IdentifierType identifierType; public IdentifierElement() { -this(null); +this(""); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Avoid NPE for default
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 1641ae41f8 Avoid NPE for default 1641ae41f8 is described below commit 1641ae41f8e6a5e5d5ff369a374e24a7fa806a9a Author: remm AuthorDate: Mon Jul 7 10:44:22 2025 +0200 Avoid NPE for default Found by Coverity. --- java/org/apache/catalina/valves/AbstractAccessLogValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/valves/AbstractAccessLogValve.java b/java/org/apache/catalina/valves/AbstractAccessLogValve.java index 531a7ee295..cb1bb385ce 100644 --- a/java/org/apache/catalina/valves/AbstractAccessLogValve.java +++ b/java/org/apache/catalina/valves/AbstractAccessLogValve.java @@ -1687,7 +1687,7 @@ public abstract class AbstractAccessLogValve extends ValveBase implements Access private final IdentifierType identifierType; public IdentifierElement() { -this(null); +this(""); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69733] New: https://mivja.com
https://bz.apache.org/bugzilla/show_bug.cgi?id=69733 Bug ID: 69733 Summary: https://mivja.com Product: Tomcat Native Version: unspecified Hardware: PC OS: Windows XP Status: NEW Severity: normal Priority: P2 Component: Documentation Assignee: dev@tomcat.apache.org Reporter: wapat74...@binafex.com Target Milestone: --- https://mivja.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69733] https://mivja.com
https://bz.apache.org/bugzilla/show_bug.cgi?id=69733 --- Comment #1 from Noah Fateh --- Created attachment 40054 --> https://bz.apache.org/bugzilla/attachment.cgi?id=40054&action=edit https://mivja.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69733] https://mivja.com
https://bz.apache.org/bugzilla/show_bug.cgi?id=69733 --- Comment #2 from Chuck Caldarale --- The content of attachment 40054 has been deleted for the following reason: Spam -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69733] https://mivja.com
https://bz.apache.org/bugzilla/show_bug.cgi?id=69733 Chuck Caldarale changed: What|Removed |Added Resolution|--- |INVALID Status|NEW |RESOLVED -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org