You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2018/02/19 09:31:47 UTC

[karaf] branch karaf-4.1.x updated: [KARAF-5601] Array values in configurations are printed as pointer addresses when using shell commands

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch karaf-4.1.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.1.x by this push:
     new 29989ca  [KARAF-5601] Array values in configurations are printed as pointer addresses when using shell commands
29989ca is described below

commit 29989ca0bfbd7fbb76efdb2e7dde87d9d09f45d0
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Feb 19 09:38:52 2018 +0100

    [KARAF-5601] Array values in configurations are printed as pointer addresses when using shell commands
---
 .../src/main/java/org/apache/karaf/config/command/PropGetCommand.java   | 2 +-
 .../src/main/java/org/apache/karaf/config/command/PropListCommand.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java b/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java
index 4656e57..891cd57 100644
--- a/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java
+++ b/config/src/main/java/org/apache/karaf/config/command/PropGetCommand.java
@@ -36,7 +36,7 @@ public class PropGetCommand extends ConfigPropertyCommandSupport {
     @SuppressWarnings("rawtypes")
     @Override
     public void propertyAction(Dictionary props) {
-        System.out.println(props.get(prop));
+        System.out.println(displayValue(props.get(prop)));
     }
 
 
diff --git a/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java b/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java
index 015e118..c9dcb7e 100644
--- a/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java
+++ b/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java
@@ -31,7 +31,7 @@ public class PropListCommand extends ConfigPropertyCommandSupport {
     public void propertyAction(Dictionary props) {
         for (Enumeration e = props.keys(); e.hasMoreElements(); ) {
             Object key = e.nextElement();
-            System.out.println("   " + key + " = " + props.get(key));
+            System.out.println("   " + key + " = " + displayValue(props.get(key)));
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
gnodet@apache.org.