Skip to content

Commit

Permalink
Fix failing hub tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jul 13, 2018
1 parent 501da5f commit 2cbcd08
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,16 @@ private Map<String, Object> getResponse(
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();
for (Map.Entry<String, Object> entry : config.entrySet()) {
Expand Down

0 comments on commit 2cbcd08

Please sign in to comment.