Return-Path: X-Original-To: apmail-karaf-commits-archive@minotaur.apache.org Delivered-To: apmail-karaf-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 992E41016E for ; Mon, 20 Jan 2014 04:50:24 +0000 (UTC) Received: (qmail 29043 invoked by uid 500); 20 Jan 2014 04:50:24 -0000 Delivered-To: apmail-karaf-commits-archive@karaf.apache.org Received: (qmail 28914 invoked by uid 500); 20 Jan 2014 04:50:21 -0000 Mailing-List: contact commits-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list commits@karaf.apache.org Received: (qmail 28750 invoked by uid 99); 20 Jan 2014 04:50:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2014 04:50:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A74A310CE1; Mon, 20 Jan 2014 04:50:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ffang@apache.org To: commits@karaf.apache.org Message-Id: <0c68f71213a44411978c6a3c7bde0d72@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: [KARAF-2694]NPE when use osgi:uninstall Date: Mon, 20 Jan 2014 04:50:18 +0000 (UTC) Updated Branches: refs/heads/karaf-2.3.x 556d39d7a -> 6817efe60 [KARAF-2694]NPE when use osgi:uninstall Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/6817efe6 Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/6817efe6 Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/6817efe6 Branch: refs/heads/karaf-2.3.x Commit: 6817efe60df82a385416c4c29c05c400954e9840 Parents: 556d39d Author: Freeman Fang Authored: Mon Jan 20 12:49:25 2014 +0800 Committer: Freeman Fang Committed: Mon Jan 20 12:49:25 2014 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/karaf/shell/osgi/BundleSelector.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/6817efe6/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/BundleSelector.java ---------------------------------------------------------------------- diff --git a/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/BundleSelector.java b/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/BundleSelector.java index 16a346e..1ede084 100644 --- a/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/BundleSelector.java +++ b/shell/osgi/src/main/java/org/apache/karaf/shell/osgi/BundleSelector.java @@ -40,7 +40,9 @@ public class BundleSelector { List bundles = new ArrayList(); if (ids != null && !ids.isEmpty()) { for (String id : ids) { - + if (id == null) { + continue; + } // id is a number Pattern pattern = Pattern.compile("^\\d+$"); Matcher matcher = pattern.matcher(id);