Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 38981 invoked from network); 29 Feb 2008 17:27:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Feb 2008 17:27:48 -0000 Received: (qmail 79125 invoked by uid 500); 29 Feb 2008 17:27:44 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 79056 invoked by uid 500); 29 Feb 2008 17:27:43 -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 79045 invoked by uid 99); 29 Feb 2008 17:27:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 09:27:43 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 17:27:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 747C81A9832; Fri, 29 Feb 2008 09:27:27 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r632398 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/monitor/Monitor.java Date: Fri, 29 Feb 2008 17:27:26 -0000 To: derby-commits@db.apache.org From: djd@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080229172727.747C81A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: djd Date: Fri Feb 29 09:27:14 2008 New Revision: 632398 URL: http://svn.apache.org/viewvc?rev=632398&view=rev Log: DERBY-3424 Change getSystemModule() to return null if the monitor is not booted, rather than a NullPointerException Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/monitor/Monitor.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/monitor/Monitor.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/monitor/Monitor.java?rev=632398&r1=632397&r2=632398&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/monitor/Monitor.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/monitor/Monitor.java Fri Feb 29 09:27:14 2008 @@ -387,9 +387,17 @@ return module; } - public static Object getSystemModule(String factoryInterface) - { - Object module = getMonitor().findModule((Object) null, + /** + * Return a system module. If it cannot be found or the monitor is + * not running then null is returned. + */ + public static Object getSystemModule(String factoryInterface) + { + ModuleFactory monitor = getMonitor(); + if (monitor == null) + return null; + + Object module = monitor.findModule((Object) null, factoryInterface, (String) null); return module; }