db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1395709 - in /db/derby/code/branches/10.7: ./ java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Date Mon, 08 Oct 2012 18:35:19 GMT
Author: mamta
Date: Mon Oct  8 18:35:19 2012
New Revision: 1395709

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

backporting to 10.7


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

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

Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=1395709&r1=1395708&r2=1395709&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Mon Oct  8 18:35:19 2012
@@ -532,7 +532,8 @@ public class BaseDataFileFactory
 
 		if (isReadOnly())		// do enough to close all files, then return 
         {
-            storageFactory.shutdown();
+			if (storageFactory != null)
+				storageFactory.shutdown();
 			return;
         }
 
@@ -1629,15 +1630,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