Skip to content

Commit 9da7919

Browse files
committed
make RequestBuilder queryParams name more explicit
1 parent bc56709 commit 9da7919

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/main/java/com/ning/http/client/RequestBuilderBase.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public String toString() {
279279
private final Class<T> derived;
280280
protected final RequestImpl request;
281281
protected UriEncoder uriEncoder;
282-
protected List<Param> queryParams;
282+
protected List<Param> rbQueryParams;
283283
protected SignatureCalculator signatureCalculator;
284284

285285
protected RequestBuilderBase(Class<T> derived, String method, boolean disableUrlEncoding) {
@@ -399,7 +399,7 @@ public void resetCookies() {
399399
}
400400

401401
public void resetQuery() {
402-
queryParams = null;
402+
rbQueryParams = null;
403403
request.uri = request.uri.withNewQuery(null);
404404
}
405405

@@ -463,17 +463,17 @@ public T setBody(BodyGenerator bodyGenerator) {
463463
}
464464

465465
public T addQueryParam(String name, String value) {
466-
if (queryParams == null)
467-
queryParams = new ArrayList<>(1);
468-
queryParams.add(new Param(name, value));
466+
if (rbQueryParams == null)
467+
rbQueryParams = new ArrayList<>(1);
468+
rbQueryParams.add(new Param(name, value));
469469
return derived.cast(this);
470470
}
471471

472472
public T addQueryParams(List<Param> params) {
473-
if (queryParams == null)
474-
queryParams = params;
473+
if (rbQueryParams == null)
474+
rbQueryParams = params;
475475
else
476-
queryParams.addAll(params);
476+
rbQueryParams.addAll(params);
477477
return derived.cast(this);
478478
}
479479

@@ -498,7 +498,7 @@ public T setQueryParams(List<Param> params) {
498498
// reset existing query
499499
if (isNonEmpty(request.uri.getQuery()))
500500
request.uri = request.uri.withNewQuery(null);
501-
queryParams = params;
501+
rbQueryParams = params;
502502
return derived.cast(this);
503503
}
504504

@@ -586,7 +586,7 @@ private void executeSignatureCalculator() {
586586
*/
587587
if (signatureCalculator != null) {
588588
RequestBuilder rb = new RequestBuilder(request).setSignatureCalculator(null);
589-
rb.queryParams = this.queryParams;
589+
rb.rbQueryParams = this.rbQueryParams;
590590
Request unsignedRequest = rb.build();
591591
signatureCalculator.calculateAndAddSignature(unsignedRequest, this);
592592
}
@@ -643,7 +643,7 @@ private void computeFinalUri() {
643643
validateSupportedScheme(request.uri);
644644
}
645645

646-
request.uri = uriEncoder.encode(request.uri, queryParams);
646+
request.uri = uriEncoder.encode(request.uri, rbQueryParams);
647647
}
648648

649649
public Request build() {

0 commit comments

Comments
 (0)