karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-3487] Fix NPE on config:edit command
Date Mon, 09 Feb 2015 16:25:22 GMT
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é <jbonofre@apache.org>
Authored: Mon Feb 9 17:24:32 2015 +0100
Committer: Jean-Baptiste Onofré <jbonofre@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");
         	}


Mime
View raw message