karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject git commit: [KARAF-2694]NPE when use osgi:uninstall
Date Mon, 20 Jan 2014 04:50:18 GMT
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 <freeman.fang@gmail.com>
Authored: Mon Jan 20 12:49:25 2014 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
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<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);


Mime
View raw message