Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 92875 invoked from network); 21 Jan 2011 12:16:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2011 12:16:19 -0000 Received: (qmail 95147 invoked by uid 500); 21 Jan 2011 12:16:18 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 95042 invoked by uid 500); 21 Jan 2011 12:16:15 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 95035 invoked by uid 99); 21 Jan 2011 12:16:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 12:16:14 +0000 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 12:16:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E565823889E0; Fri, 21 Jan 2011 12:15:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1061781 - /felix/trunk/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java Date: Fri, 21 Jan 2011 12:15:53 -0000 To: commits@felix.apache.org From: marrs@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110121121553.E565823889E0@eris.apache.org> Author: marrs Date: Fri Jan 21 12:15:53 2011 New Revision: 1061781 URL: http://svn.apache.org/viewvc?rev=1061781&view=rev Log: When the resource processor gets a resource that contains no Designates, which might be a bit strange but is allowed according to the spec, the processor throws a NPE, when it should just not do any processing. This change does just that, and logs the fact that there are no Designates. Modified: felix/trunk/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java Modified: felix/trunk/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java URL: http://svn.apache.org/viewvc/felix/trunk/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java?rev=1061781&r1=1061780&r2=1061781&view=diff ============================================================================== --- felix/trunk/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java (original) +++ felix/trunk/deploymentadmin/autoconf/src/main/java/org/apache/felix/deployment/rp/autoconf/AutoConfResourceProcessor.java Fri Jan 21 12:15:53 2011 @@ -100,6 +100,11 @@ public class AutoConfResourceProcessor i // process resources Map designates = data.getDesignates(); + if (designates == null) { + // if there are no designates, there's nothing to process + m_log.log(LogService.LOG_INFO, "No designates found in the resource, so there's nothing to process."); + return; + } Map localOcds = data.getObjectClassDefinitions(); Iterator i = designates.keySet().iterator(); while (i.hasNext()) {