Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 96728 invoked from network); 21 Sep 2007 14:09:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Sep 2007 14:09:40 -0000 Received: (qmail 95877 invoked by uid 500); 21 Sep 2007 14:09:13 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 95859 invoked by uid 500); 21 Sep 2007 14:09:13 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 95845 invoked by uid 99); 21 Sep 2007 14:09:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2007 07:09:13 -0700 X-ASF-Spam-Status: No, hits=-100.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, 21 Sep 2007 14:09:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EC13F1A9832; Fri, 21 Sep 2007 07:09:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r578126 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java Date: Fri, 21 Sep 2007 14:09:01 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070921140901.EC13F1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Fri Sep 21 07:09:01 2007 New Revision: 578126 URL: http://svn.apache.org/viewvc?rev=578126&view=rev Log: Added some defensive code to avoid NPE if the attrsId is null Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java?rev=578126&r1=578125&r2=578126&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java Fri Sep 21 07:09:01 2007 @@ -92,8 +92,15 @@ */ public String[] getAttrsIdArray() { - String[] attrs = new String[ attrsId.size()]; - return attrsId.toArray( attrs ); + if ( attrsId == null ) + { + return new String[]{}; + } + else + { + String[] attrs = new String[ attrsId.size()]; + return attrsId.toArray( attrs ); + } } /**