You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2015/02/09 17:25:22 UTC

karaf git commit: [KARAF-3487] Fix NPE on config:edit command

Repository: karaf
Updated Branches:
  refs/heads/master afbd611de -> b867058ed


[KARAF-3487] Fix NPE on config:edit command


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

Branch: refs/heads/master
Commit: b867058ed1b875778382b4fb241a24efb5158bd5
Parents: afbd611
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Mon Feb 9 17:24:32 2015 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Mon Feb 9 17:24:32 2015 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/karaf/config/command/EditCommand.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/b867058e/config/src/main/java/org/apache/karaf/config/command/EditCommand.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/command/EditCommand.java b/config/src/main/java/org/apache/karaf/config/command/EditCommand.java
index 8c48b83..3fcd820 100644
--- a/config/src/main/java/org/apache/karaf/config/command/EditCommand.java
+++ b/config/src/main/java/org/apache/karaf/config/command/EditCommand.java
@@ -50,6 +50,9 @@ public class EditCommand extends ConfigCommandSupport {
         
         if (pid.startsWith("(")) {
         	Configuration[] configs = this.configRepository.getConfigAdmin().listConfigurations(pid);
+            if (configs == null) {
+                throw new RuntimeException("No config found");
+            }
         	if (configs.length == 0) {
         		throw new RuntimeException("Filter matches no config");
         	}