tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1393943 - /tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
Date Thu, 04 Oct 2012 07:55:28 GMT
Author: kfujino
Date: Thu Oct  4 07:55:27 2012
New Revision: 1393943

URL: http://svn.apache.org/viewvc?rev=1393943&view=rev
Log:
Avoid NPE.

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=1393943&r1=1393942&r2=1393943&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java Thu Oct
 4 07:55:27 2012
@@ -623,7 +623,10 @@ public abstract class AbstractReplicated
             MapEntry<K,V> entry = innerMap.get(mapmsg.getKey());
             if ( entry==null ) {
                 entry = new MapEntry<>((K) mapmsg.getKey(), (V) mapmsg.getValue());
-                entry = innerMap.putIfAbsent(entry.getKey(), entry);
+                MapEntry<K,V> old = innerMap.putIfAbsent(entry.getKey(), entry);
+                if (old != null) {
+                    entry = old;
+                }
             }
             entry.setProxy(true);
             entry.setBackup(false);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message