Skip to content

Commit

Permalink
Merge pull request #123 from avasachinbaijal/AS-24,APIPLAT-5412,APIPL…
Browse files Browse the repository at this point in the history
…AT-5494

Update for Java 7 - replace lamda with for loop
  • Loading branch information
svc-developer authored Mar 21, 2022
2 parents 251d81b + ff4ff72 commit c29241f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/net/avalara/avatax/rest/client/RestCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;

public class RestCall<T> implements Callable<T> {
Expand Down Expand Up @@ -192,9 +193,9 @@ private void buildRequest(HttpRequestBase baseRequest, String apiVersion, HashMa
String clientId = String.format("%s; %s; %s; %s; %s", appName, appVersion, "JavaRestClient", apiVersion, machineName);
baseRequest.setHeader(AvaTaxConstants.XClientHeader, clientId);
if (headers!=null && !headers.isEmpty()) {
headers.forEach((key, value) -> {
baseRequest.setHeader(key, value);
});
for (Map.Entry<String,String> entry : headers.entrySet()) {
baseRequest.setHeader(entry.getKey() , entry.getValue());
}
}
}

Expand Down

0 comments on commit c29241f

Please sign in to comment.