Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 24301 invoked from network); 14 May 2009 20:04:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 May 2009 20:04:22 -0000 Received: (qmail 38029 invoked by uid 500); 14 May 2009 20:04:22 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 38010 invoked by uid 500); 14 May 2009 20:04:22 -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 38001 invoked by uid 99); 14 May 2009 20:04:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2009 20:04:22 +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; Thu, 14 May 2009 20:04:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7AF652388898; Thu, 14 May 2009 20:03:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r774904 - /felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java Date: Thu, 14 May 2009 20:03:59 -0000 To: commits@felix.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090514200359.7AF652388898@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rickhall Date: Thu May 14 20:03:59 2009 New Revision: 774904 URL: http://svn.apache.org/viewvc?rev=774904&view=rev Log: OBR expected all resources to have a presentation name when listing them, when they did not an NPE resulted. (FELIX-1157) Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java?rev=774904&r1=774903&r2=774904&view=diff ============================================================================== --- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java (original) +++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java Thu May 14 20:03:59 2009 @@ -241,7 +241,12 @@ // Otherwise, compare the presentation name to keep them sorted // by presentation name. If the presentation names are equal, then // use the symbolic name to differentiate. - int compare = r1.getPresentationName().compareToIgnoreCase(r2.getPresentationName()); + int compare = (r1.getPresentationName() == null) + ? -1 + : (r2.getPresentationName() == null) + ? 1 + : r1.getPresentationName().compareToIgnoreCase( + r2.getPresentationName()); if (compare == 0) { return symCompare;