22
33import java .lang .reflect .Array ;
44import java .util .Arrays ;
5- import java .util .Collections ;
65import java .util .List ;
76import java .util .Map ;
87import java .util .concurrent .ExecutionException ;
1312import javax .ws .rs .core .Response ;
1413
1514import jersey .repackaged .com .google .common .base .Throwables ;
15+ import jersey .repackaged .com .google .common .collect .Maps ;
1616
1717import org .glassfish .jersey .client .JerseyWebTarget ;
1818import org .glassfish .jersey .client .authentication .HttpAuthenticationFeature ;
@@ -28,7 +28,7 @@ public abstract class CreatubblesRequest<T extends CreatubblesResponse> {
2828
2929 private String endPoint , acceptLanguage , data ;
3030 private HttpMethod httpMethod ;
31- private Map <String , String > urlParameters ;
31+ private final Map <String , String > urlParameters = Maps . newHashMap () ;
3232 private Response response ;
3333 private Future <Response > futureResponse ;
3434
@@ -55,9 +55,7 @@ public CreatubblesRequest(String endPoint, HttpMethod httpMethod, String accessT
5555 this .endPoint = endPoint ;
5656 this .httpMethod = httpMethod ;
5757 if (urlParameters != null ) {
58- this .urlParameters = urlParameters ;
59- } else {
60- this .urlParameters = Collections .emptyMap ();
58+ this .urlParameters .putAll (urlParameters );
6159 }
6260 this .accessToken = accessToken ;
6361 }
0 commit comments