Skip to content

Commit

Permalink
StashApiClient: Remove useless casts and class prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
proski authored and jakub-bochenski committed Jun 3, 2019
1 parent 8753b16 commit 680a7b8
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,10 @@ private HttpClient getHttpClient() {
// ConnectionTimeout : This denotes the time elapsed before the connection established or Server
// responded to connection request.
httpParams.setParameter(
CoreConnectionPNames.CONNECTION_TIMEOUT,
StashApiClient.HTTP_CONNECTION_TIMEOUT_SECONDS * 1000);
CoreConnectionPNames.CONNECTION_TIMEOUT, HTTP_CONNECTION_TIMEOUT_SECONDS * 1000);
// SoTimeout : Maximum period inactivity between two consecutive data packets arriving at client
// side after connection is established.
httpParams.setParameter(
CoreConnectionPNames.SO_TIMEOUT, StashApiClient.HTTP_SOCKET_TIMEOUT_SECONDS * 1000);
httpParams.setParameter(CoreConnectionPNames.SO_TIMEOUT, HTTP_SOCKET_TIMEOUT_SECONDS * 1000);

// if (Jenkins.getInstance() != null) {
// ProxyConfiguration proxy = Jenkins.getInstance().proxy;
Expand Down Expand Up @@ -275,7 +273,7 @@ public Callable<String> init(HttpClient client, GetMethod httpget) {
}.init(client, httpget));
thread = new Thread(httpTask);
thread.start();
response = httpTask.get((long) StashApiClient.HTTP_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
response = httpTask.get(HTTP_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);

} catch (TimeoutException e) {
e.printStackTrace();
Expand Down Expand Up @@ -332,7 +330,7 @@ public Callable<Integer> init(HttpClient client, DeleteMethod httppost) {
}.init(client, httppost));
thread = new Thread(httpTask);
thread.start();
res = httpTask.get((long) StashApiClient.HTTP_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
res = httpTask.get(HTTP_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);

} catch (TimeoutException e) {
e.printStackTrace();
Expand Down Expand Up @@ -423,7 +421,7 @@ public Callable<String> init(HttpClient client, PostMethod httppost) {
}.init(client, httppost));
thread = new Thread(httpTask);
thread.start();
response = httpTask.get((long) StashApiClient.HTTP_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
response = httpTask.get(HTTP_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);

} catch (TimeoutException e) {
e.printStackTrace();
Expand Down

0 comments on commit 680a7b8

Please sign in to comment.