> Multimap<String, Object> queryParams = addQueryParams(tokenValues, > invocation); > - Multimap<String, String> headers = buildHeaders(tokenValues, > invocation); > + > + Multimap<String, String> headers; > + > + if (caller != null) { > + headers = buildHeaders(tokenValues, caller); > + headers.putAll(buildHeaders(tokenValues, invocation)); > + } else { > + headers = buildHeaders(tokenValues, invocation);
To avoid the duplication of the `buildHeaders` call, something like" ``` Multimap<String, String> headers; if (caller == null) { headers = LinkedHashMultimap.create(); } else { headers = buildHeaders(tokenValues, caller); } // invocation values override caller values headers.putAll(buildHeaders(tokenValues, invocation)); ``` ? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/226/files#r8223202