@@ -111,15 +111,15 @@ public void setProxy(String proxyHost, int proxyPort, String proxyUsername, Stri
111
111
return ;
112
112
}
113
113
114
- BasicCredentialsProvider basicCredentialsProvider = new BasicCredentialsProvider ();
115
- AuthScope proxyAuthScope = new AuthScope (proxyHost , proxyPort );
114
+ final BasicCredentialsProvider basicCredentialsProvider = new BasicCredentialsProvider ();
115
+ final AuthScope proxyAuthScope = new AuthScope (proxyHost , proxyPort );
116
116
UsernamePasswordCredentials proxyAuthentication =
117
117
new UsernamePasswordCredentials (proxyUsername , proxyPassword );
118
118
basicCredentialsProvider .setCredentials (proxyAuthScope , proxyAuthentication );
119
119
120
- HttpHost proxy = new HttpHost (proxyHost , proxyPort );
121
- HttpClient client = HttpClientBuilder .create ().setProxy (proxy ).setDefaultCredentialsProvider (basicCredentialsProvider ).build ();
122
- ApacheHttpTransport transport = new ApacheHttpTransport (client );
120
+ final HttpHost proxy = new HttpHost (proxyHost , proxyPort );
121
+ final HttpClient client = HttpClientBuilder .create ().setProxy (proxy ).setDefaultCredentialsProvider (basicCredentialsProvider ).build ();
122
+ final ApacheHttpTransport transport = new ApacheHttpTransport (client );
123
123
this .HTTP_TRANSPORT = transport ;
124
124
this .requestFactory = newRequestFactory ();
125
125
}
@@ -258,10 +258,10 @@ protected BrowserStackRequest newRequest(final Method method, final String path,
258
258
259
259
protected BrowserStackRequest signRequest (final HttpRequest request ) {
260
260
checkAuthState ();
261
- HttpHeaders header = new HttpHeaders ();
262
- String combined = this .username + ":" + this .accessKey ;
263
- String encoded = new String (Base64 .encodeBase64 (combined .getBytes ()));
264
- String credential = "Basic " + encoded ;
261
+ final HttpHeaders header = new HttpHeaders ();
262
+ final String combined = this .username + ":" + this .accessKey ;
263
+ final String encoded = new String (Base64 .encodeBase64 (combined .getBytes ()));
264
+ final String credential = "Basic " + encoded ;
265
265
header .set ("Authorization" , credential );
266
266
request .setHeaders (header );
267
267
return new BrowserStackRequest (request );
0 commit comments