db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1062959 - in /db/derby/code/branches/10.6: ./ java/engine/org/apache/derby/impl/store/raw/xact/Xact.java
Date Mon, 24 Jan 2011 20:41:22 GMT
Author: kmarsden
Date: Mon Jan 24 20:41:21 2011
New Revision: 1062959

URL: http://svn.apache.org/viewvc?rev=1062959&view=rev
Log:
DERBY-4973 NullPointerException in updatelocks.sql encryption tests on IBM 1.6


Modified:
    db/derby/code/branches/10.6/   (props changed)
    db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java

Propchange: db/derby/code/branches/10.6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 24 20:41:21 2011
@@ -1,2 +1,2 @@
-/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,957902,958163,958257,958264,958508,958522,958555,958618,958939,959550,962716,963206,963705,964115,965647,967304,980684,986689,986834,987539,989099,990292,997325,998170,999119,1002291,1002682,1002853,1021426,1025795,1028716,1030043,1033864,1038514,1040658,1053724,1055169
+/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,957902,958163,958257,958264,958508,958522,958555,958618,958939,959550,962716,963206,963705,964115,965647,967304,980684,986689,986834,987539,989099,990292,997325,998170,999119,1002291,1002682,1002853,1021426,1025795,1028716,1030043,1033864,1038514,1040658,1053724,1055169,1062096
 /db/derby/docs/trunk:954344

Modified: db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java?rev=1062959&r1=1062958&r2=1062959&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java
(original)
+++ db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java
Mon Jan 24 20:41:21 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



Mime
View raw message