db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r473687 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
Date Sat, 11 Nov 2006 10:28:07 GMT
Author: kahatlen
Date: Sat Nov 11 02:28:07 2006
New Revision: 473687

URL: http://svn.apache.org/viewvc?view=rev&rev=473687
Log:
DERBY-2067: Assert failure in EmbedConnection.restoreContextStack()
when running lang/closed.java

Change the assert so that it doesn't raise an error if the engine has
been shut down.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java?view=diff&rev=473687&r1=473686&r2=473687
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java Sat Nov
11 02:28:07 2006
@@ -1557,13 +1557,14 @@
 		// are exiting the system in the nested case.
 		if (SanityManager.DEBUG)
 		{
-			if ((tr.getCsf() != null) && (tr.getCsf().getCurrentContextManager() !=
-				tr.getContextManager()))
-			{
-				Util.THROWASSERT(this, 
+			if (tr.getCsf() != null) {
+				ContextManager cm1 = tr.getCsf().getCurrentContextManager();
+				ContextManager cm2 = tr.getContextManager();
+				// If the system has been shut down, cm1 can be null.
+				// Otherwise, cm1 and cm2 should be identical.
+				Util.ASSERT(this, (cm1 == cm2 || cm1 == null),
 					"Current Context Manager not the one was expected: " +
-					 tr.getCsf().getCurrentContextManager() + " " + 
-					 tr.getContextManager());
+					 cm1 + " " + cm2);
 			}
 		}
 



Mime
View raw message