Skip to content
Prev Previous commit
Next Next commit
Fix acquireHostList db call
  • Loading branch information
mpv1989 committed Nov 23, 2017
commit eab4c625ac1f0abaf9e16103242dbe037a21ecf0
13 changes: 11 additions & 2 deletions src/main/java/com/arangodb/ArangoDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import javax.net.ssl.SSLContext;
Expand Down Expand Up @@ -447,13 +448,21 @@ public Collection<String> deserialize(final Response response) throws VPackExcep
if (field.isNone()) {
endpoints = Collections.<String> emptyList();
} else {
endpoints = util().deserialize(field, Collection.class);
final Collection<Map<String, String>> tmp = util().deserialize(field,
Collection.class);
endpoints = new ArrayList<String>();
for (final Map<String, String> map : tmp) {
for (final String value : map.values()) {
endpoints.add(value);
}
}
}
return endpoints;
}
}, null);
} catch (final ArangoDBException e) {
if (e.getResponseCode() == 403) {
final Integer responseCode = e.getResponseCode();
if (responseCode != null && responseCode == 403) {
response = Collections.<String> emptyList();
} else {
throw e;
Expand Down