Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B061DF08 for ; Mon, 8 Oct 2012 18:36:06 +0000 (UTC) Received: (qmail 53723 invoked by uid 500); 8 Oct 2012 18:36:06 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 53703 invoked by uid 500); 8 Oct 2012 18:36:06 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 53695 invoked by uid 99); 8 Oct 2012 18:36:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 18:36:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 18:36:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 05F9023889BF; Mon, 8 Oct 2012 18:35:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: derby-commits@db.apache.org From: mamta@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121008183520.05F9023889BF@eris.apache.org> 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 - } } /**