db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1395788 - in /db/derby/code/branches/10.5: ./ java/ java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Date Mon, 08 Oct 2012 21:48:30 GMT
Author: mamta
Date: Mon Oct  8 21:48:30 2012
New Revision: 1395788

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

backporting to 10.5


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

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

Propchange: db/derby/code/branches/10.5/java/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk/java:r1394883

Modified: db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=1395788&r1=1395787&r2=1395788&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Mon Oct  8 21:48:30 2012
@@ -546,7 +546,8 @@ public class BaseDataFileFactory
 
 		if (isReadOnly())		// do enough to close all files, then return 
         {
-            storageFactory.shutdown();
+			if (storageFactory != null)
+				storageFactory.shutdown();
 			return;
         }
 
@@ -1643,15 +1644,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