You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2014/01/20 05:51:37 UTC

git commit: [KARAF-2694]NPE when use osgi:uninstall (cherry picked from commit 6817efe60df82a385416c4c29c05c400954e9840)

Updated Branches:
  refs/heads/karaf-2.x 9de0903e8 -> f525a6829


[KARAF-2694]NPE when use osgi:uninstall
(cherry picked from commit 6817efe60df82a385416c4c29c05c400954e9840)


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f525a682
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f525a682
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f525a682

Branch: refs/heads/karaf-2.x
Commit: f525a6829ff08610683e7364e509456cc08d950d
Parents: 9de0903
Author: Freeman Fang <fr...@gmail.com>
Authored: Mon Jan 20 12:49:25 2014 +0800
Committer: Freeman Fang <fr...@gmail.com>
Committed: Mon Jan 20 12:51:05 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/f525a682/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 c0b896a..16852ec 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<Bundle> bundles = new ArrayList<Bundle>();
         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);