#483 - Polishing.

Since we can't guarantee the incoming Map is <String,Object>, should only cast as <Object,Object> and use `.toString()` for maximum flexibility.
This commit is contained in:
Greg Turnquist
2018-12-21 08:43:21 -06:00
parent 8ced6c5154
commit 26c9a3d71e

View File

@@ -318,8 +318,8 @@ public class UriTemplate implements Iterable<TemplateVariable>, Serializable {
builder.queryParam(name, valuePart);
}
} else if (value instanceof Map) {
for (Entry<String, Object> queryParam : (Set<Entry<String, Object>>) ((Map) value).entrySet()) {
builder.queryParam(queryParam.getKey(), queryParam.getValue());
for (Entry<Object, Object> queryParam : (Set<Entry<Object, Object>>) ((Map) value).entrySet()) {
builder.queryParam(queryParam.getKey().toString(), queryParam.getValue());
}
} else {
builder.queryParam(name, value);