Skip to content

Commit

Permalink
Fix performance linting problem with maps in java ApiClient template (#…
Browse files Browse the repository at this point in the history
…7685)

* Fix performance linting problem with maps

* Fix the other map performance issue as well
  • Loading branch information
dennistruemper authored and wing328 committed Mar 5, 2018
1 parent 3bcf0ff commit 70b4b55
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 70b4b55

Please sign in to comment.