Fix performance linting problem with maps in java ApiClient template (#7685)

* Fix performance linting problem with maps

* Fix the other map performance issue as well
This commit is contained in:
dennistruemper 2018-03-05 12:12:39 +01:00 committed by William Cheng
parent 3bcf0ff764
commit 70b4b55fae

View File

@ -646,12 +646,12 @@ public class ApiClient {
builder = httpClient.resource(url).accept(accept);
}
for (String key : headerParams.keySet()) {
builder = builder.header(key, headerParams.get(key));
for (Entry<String, String> keyValue : headerParams.entrySet()) {
builder = builder.header(keyValue.getKey(), keyValue.getValue());
}
for (String key : defaultHeaderMap.keySet()) {
if (!headerParams.containsKey(key)) {
builder = builder.header(key, defaultHeaderMap.get(key));
for (Map.Entry<String,String> keyValue : defaultHeaderMap.entrySet()) {
if (!headerParams.containsKey(keyValue.getKey())) {
builder = builder.header(keyValue.getKey(), keyValue.getValue());
}
}