(tomcat) branch 9.0.x updated: No need to notify if there was no entry to remove

[email protected] Fri, 10 Jul 2026 07:41:47 +0000
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178366930705.2389444.1500723487745400300@gitbox3-he-fi.apache.org>
This is an automated email from the ASF dual-hosted git repository.

markt-asf 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 eab6ad7835 No need to notify if there was no entry to remove
eab6ad7835 is described below

commit eab6ad7835c045010ecca95bd8cc6c34b03c4b72
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Jul 10 08:41:07 2026 +0100

    No need to notify if there was no entry to remove
---
 java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
index 4b61a42f26..5a93cb0118 100644
--- a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
+++ b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
@@ -1183,7 +1183,7 @@ public abstract class AbstractReplicatedMap<K, V>
         MapEntry<K,V> entry = innerMap.remove(key);
 
         try {
-            if (getMapMembers().length > 0 && notify) {
+            if (getMapMembers().length > 0 && notify && entry != null) {
                 MapMessage msg = new MapMessage(getMapContextName(), MapMessage.MSG_REMOVE, false, (Serializable) key,
                         null, null, null, null);
                 getChannel().send(getMapMembers(), msg, getChannelSendOptions());