db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1395148 - in /db/derby/code/branches/10.9: ./ java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Date Sat, 06 Oct 2012 18:47:19 GMT
Author: mamta
Date: Sat Oct  6 18:47:18 2012
New Revision: 1395148

URL: http://svn.apache.org/viewvc?rev=1395148&view=rev
Log:
DERBY-5916 (java.lang.NullPointerException org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop()
connecting to network server)

backporting to 10.9


Modified:
    db/derby/code/branches/10.9/   (props changed)
    db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java

Propchange: db/derby/code/branches/10.9/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1394883

Modified: db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=1395148&r1=1395147&r2=1395148&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Sat Oct  6 18:47:18 2012
@@ -529,7 +529,8 @@ public class BaseDataFileFactory
 
 		if (isReadOnly())		// do enough to close all files, then return 
         {
-            storageFactory.shutdown();
+			if (storageFactory != null)
+				storageFactory.shutdown();
 			return;
         }
 
@@ -1586,15 +1587,18 @@ public class BaseDataFileFactory
 	*/
 	private synchronized void removeStubs()
 	{
-        actionCode = REMOVE_STUBS_ACTION;
-        try
+        if( storageFactory != null) 
         {
-            AccessController.doPrivileged( this);
+            actionCode = REMOVE_STUBS_ACTION;
+            try
+            {
+                AccessController.doPrivileged( this);
+            }
+            catch (PrivilegedActionException pae)
+            {
+                // removeStubs does not throw an exception
+            } 
         }
-        catch (PrivilegedActionException pae)
-        {
-            // removeStubs does not throw an exception
-        } 
 	}
 
 	/**



Mime
View raw message