updated param building

This commit is contained in:
Misagh Moayyed 2015-06-05 15:17:04 -07:00
parent 57ab9afbdc
commit 3080484a88
1 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ public final class URIBuilder {
* Construct an instance from the string which must be a valid URI.
*
* @param string a valid URI in string form
* @throws URISyntaxException if the input is not a valid URI
* @throws RuntimeException if the input is not a valid URI
*/
public URIBuilder(final String string) {
super();
@ -99,7 +99,7 @@ public final class URIBuilder {
/**
* Construct an instance from the provided URI.
* @param uri
* @param uri the uri to digest
*/
public URIBuilder(final URI uri) {
super();
@ -354,7 +354,7 @@ public final class URIBuilder {
* </p>
*/
public URIBuilder addParameters(final List <BasicNameValuePair> nvps) {
if (this.queryParams == null) {
if (this.queryParams == null || this.queryParams.isEmpty()) {
this.queryParams = new ArrayList<BasicNameValuePair>();
}
this.queryParams.addAll(nvps);