Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 38372 invoked from network); 23 Jan 2011 17:16:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jan 2011 17:16:54 -0000 Received: (qmail 77187 invoked by uid 500); 23 Jan 2011 17:16:54 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 77128 invoked by uid 500); 23 Jan 2011 17:16:52 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 77121 invoked by uid 99); 23 Jan 2011 17:16:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jan 2011 17:16:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Sun, 23 Jan 2011 17:16:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9A82623888D2; Sun, 23 Jan 2011 17:16:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1062471 - in /db/derby/code/branches/10.7: ./ java/engine/org/apache/derby/impl/store/raw/xact/Xact.java Date: Sun, 23 Jan 2011 17:16:31 -0000 To: derby-commits@db.apache.org From: kmarsden@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110123171631.9A82623888D2@eris.apache.org> Author: kmarsden Date: Sun Jan 23 17:16:31 2011 New Revision: 1062471 URL: http://svn.apache.org/viewvc?rev=1062471&view=rev Log: DERBY-4973 NullPointerException in updatelocks.sql encryption tests on IBM 1.6 merge 1062096 from trunk Modified: db/derby/code/branches/10.7/ (props changed) db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java Propchange: db/derby/code/branches/10.7/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Jan 23 17:16:31 2011 @@ -1 +1 @@ -/db/derby/code/trunk:1035603,1036769,1038514,1038813,1039084,1039268,1040658,1041338,1043227,1043389,1044096,1051026,1053724,1055169,1059888,1060480 +/db/derby/code/trunk:1035603,1036769,1038514,1038813,1039084,1039268,1040658,1041338,1043227,1043389,1044096,1051026,1053724,1055169,1059888,1060480,1062096 Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java?rev=1062471&r1=1062470&r2=1062471&view=diff ============================================================================== --- db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java (original) +++ db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java Sun Jan 23 17:16:31 2011 @@ -624,14 +624,17 @@ public class Xact extends RawTransaction return myId; } - /** - Get my transaction context Id - */ - public final String getContextId() - { - return (xc == null) ? null : xc.getIdName(); - } - + /** + * Get my transaction context Id + */ + public final String getContextId() { + //DERBY-4973. Make a copy of xc so we are working on a stable + // copy, especially for the lock table VTI. If we don't, there may + // be a chance for a NullPointerException if close() is called + //by another thread after the check but before the dereference. + XactContext tempxc = xc; + return (tempxc == null) ? null : tempxc.getIdName(); + } /** Get the current default locking policy for all operations within this