summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-08-02 18:40:34 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-08-02 18:40:34 +0530
commitfb66d03bfd5089485362fa489775fbef0da51a5b (patch)
tree6dc872a941082873dcd2fae2a462a2b7e749ff97
parent967cd543f5356afc3c1d8e7b230248c64e34a5d3 (diff)
Modified method executeOnServer NOT to unmarshall the command output if the expected class is String
-rw-r--r--src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/ServerUtil.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/ServerUtil.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/ServerUtil.java
index 91c7c81c..6cd8303c 100644
--- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/ServerUtil.java
+++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/ServerUtil.java
@@ -149,6 +149,9 @@ public class ServerUtil {
Class expectedClass) {
try {
String output = executeOnServer(serverName, commandWithArgs);
+ if(expectedClass == String.class) {
+ return output;
+ }
// In case the script execution exits ungracefully, the agent would return a GenericResponse.
// hence pass last argument as true to try GenericResponse unmarshalling in such cases.