2
2
3
3
import java .lang .reflect .Array ;
4
4
import java .util .Arrays ;
5
- import java .util .Collections ;
6
5
import java .util .List ;
7
6
import java .util .Map ;
8
7
import java .util .concurrent .ExecutionException ;
13
12
import javax .ws .rs .core .Response ;
14
13
15
14
import jersey .repackaged .com .google .common .base .Throwables ;
15
+ import jersey .repackaged .com .google .common .collect .Maps ;
16
16
17
17
import org .glassfish .jersey .client .JerseyWebTarget ;
18
18
import org .glassfish .jersey .client .authentication .HttpAuthenticationFeature ;
@@ -28,7 +28,7 @@ public abstract class CreatubblesRequest<T extends CreatubblesResponse> {
28
28
29
29
private String endPoint , acceptLanguage , data ;
30
30
private HttpMethod httpMethod ;
31
- private Map <String , String > urlParameters ;
31
+ private final Map <String , String > urlParameters = Maps . newHashMap () ;
32
32
private Response response ;
33
33
private Future <Response > futureResponse ;
34
34
@@ -55,9 +55,7 @@ public CreatubblesRequest(String endPoint, HttpMethod httpMethod, String accessT
55
55
this .endPoint = endPoint ;
56
56
this .httpMethod = httpMethod ;
57
57
if (urlParameters != null ) {
58
- this .urlParameters = urlParameters ;
59
- } else {
60
- this .urlParameters = Collections .emptyMap ();
58
+ this .urlParameters .putAll (urlParameters );
61
59
}
62
60
this .accessToken = accessToken ;
63
61
}
0 commit comments