Simplify JavaUrlHttpCommandExecutorService.invoke

This commit is contained in:
Andrew Gaul 2012-03-20 00:06:39 -07:00
parent cf3261e5e7
commit f32b40b174
1 changed files with 2 additions and 2 deletions

View File

@ -135,8 +135,8 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe
headerBuilder.putAll(header, entry.getValue());
}
ImmutableMultimap<String, String> headers = headerBuilder.build();
Payload payload = in != null ? newInputStreamPayload(in) : null;
if (payload != null) {
if (in != null) {
Payload payload = newInputStreamPayload(in);
payload.getContentMetadata().setPropertiesFromHttpHeaders(headers);
builder.payload(payload);
}