Fix failing hub tests
@@ -128,17 +128,15 @@ protected void process(
res.put(SUCCESS, true);
try {
- String configuration = request.getParameter(CONFIGURATION);
+ List<String> keysToReturn = null;
- if (Strings.isNullOrEmpty(configuration)) {
- configuration = "";
- if (requestJSON.containsKey(CONFIGURATION)) {
+ String configuration = request.getParameter(CONFIGURATION);
+ if (!Strings.isNullOrEmpty(configuration)) {
+ keysToReturn = Splitter.on(",").omitEmptyStrings().splitToList(configuration);
+ } else if (requestJSON.get(CONFIGURATION) instanceof List) {
//noinspection unchecked
- configuration = requestJSON.get(CONFIGURATION).toString();
+ keysToReturn = (List<String>) requestJSON.get(CONFIGURATION);
}
- }
-
- List<String> keysToReturn = Splitter.on(",").omitEmptyStrings().splitToList(configuration);
GridRegistry registry = getRegistry();
Map<String, Object> config = registry.getHub().getConfiguration().toJson();
