Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1F34D393 for ; Thu, 4 Oct 2012 07:56:16 +0000 (UTC) Received: (qmail 74563 invoked by uid 500); 4 Oct 2012 07:56:16 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 74478 invoked by uid 500); 4 Oct 2012 07:56:15 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 74458 invoked by uid 99); 4 Oct 2012 07:56:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 07:56:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 07:56:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 67FE323889D7 for ; Thu, 4 Oct 2012 07:55:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1393943 - /tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java Date: Thu, 04 Oct 2012 07:55:28 -0000 To: dev@tomcat.apache.org From: kfujino@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121004075528.67FE323889D7@eris.apache.org> 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 entry = innerMap.get(mapmsg.getKey()); if ( entry==null ) { entry = new MapEntry<>((K) mapmsg.getKey(), (V) mapmsg.getValue()); - entry = innerMap.putIfAbsent(entry.getKey(), entry); + MapEntry 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