Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 9689 invoked from network); 20 Apr 2006 07:53:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Apr 2006 07:53:19 -0000 Received: (qmail 47880 invoked by uid 500); 20 Apr 2006 07:53:18 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 47812 invoked by uid 500); 20 Apr 2006 07:53:18 -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 47795 invoked by uid 99); 20 Apr 2006 07:53:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2006 00:53:17 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 20 Apr 2006 00:53:17 -0700 Received: (qmail 9512 invoked by uid 65534); 20 Apr 2006 07:52:57 -0000 Message-ID: <20060420075257.9511.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r395525 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/JNDIAuthenticationSchemeBase.java Date: Thu, 20 Apr 2006 07:52:56 -0000 To: derby-commits@db.apache.org From: bernt@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: bernt Date: Thu Apr 20 00:52:53 2006 New Revision: 395525 URL: http://svn.apache.org/viewcvs?rev=395525&view=rev Log: DERBY-1174 NullPointerException in network server with LDAP authentication Submitted by Anders Morken Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/JNDIAuthenticationSchemeBase.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/JNDIAuthenticationSchemeBase.java URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/JNDIAuthenticationSchemeBase.java?rev=395525&r1=395524&r2=395525&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/JNDIAuthenticationSchemeBase.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/JNDIAuthenticationSchemeBase.java Thu Apr 20 00:52:53 2006 @@ -97,16 +97,19 @@ // // We retrieve JNDI properties set at the database level - // if any. + // if any. If dbProps == null, there are obviously no database + // properties to retrieve. // initDirContextEnv = new Properties(); + + if(dbProps != null) { + for (Enumeration keys = dbProps.propertyNames(); keys.hasMoreElements(); ) { - for (Enumeration keys = dbProps.propertyNames(); keys.hasMoreElements(); ) { + String key = (String) keys.nextElement(); - String key = (String) keys.nextElement(); - - if (key.startsWith("java.naming.")) { - initDirContextEnv.put(key, dbProps.getProperty(key)); + if (key.startsWith("java.naming.")) { + initDirContextEnv.put(key, dbProps.getProperty(key)); + } } } }