Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Commit

Permalink
Fixing Map issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jrichard committed Feb 14, 2018
1 parent 9523d8c commit f5bab8e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.io.File;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.codec.Charsets;
Expand Down Expand Up @@ -92,10 +92,11 @@ public String getUri() {
}

public Map<String, String> getPopulatedQueryParameters() {
if (getQueryParameters() == null) {
return Collections.emptyMap();
final Map<String, String> populatedQueryParameters = new HashMap<>();
if (getQueryParameters() != null && !getQueryParameters().isEmpty()) {
populatedQueryParameters.putAll(getQueryParameters());
}
return getQueryParameters();
return populatedQueryParameters;
}

public HttpMethod getMethod() {
Expand Down

0 comments on commit f5bab8e

Please sign in to comment.