Skip to content

Commit 34976ed

Browse files
author
stoesselt
committed
Commit corrections by build process
1 parent 5fd8e3a commit 34976ed

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

src/main/java/se/bjurr/violations/comments/bitbucketserver/lib/client/BitbucketServerClient.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,13 @@ private String doInvokeUrl(final String string, final Method method, final Strin
101101
return bitbucketServerInvoker.invokeUrl(
102102
string, method, postContent, bitbucketPersonalAccessToken, proxyInformation);
103103
} else {
104-
return bitbucketServerInvoker.invokeUrl(string, method, postContent, bitbucketServerUser,
105-
bitbucketServerPassword, proxyInformation);
104+
return bitbucketServerInvoker.invokeUrl(
105+
string,
106+
method,
107+
postContent,
108+
bitbucketServerUser,
109+
bitbucketServerPassword,
110+
proxyInformation);
106111
}
107112
}
108113

src/main/java/se/bjurr/violations/comments/bitbucketserver/lib/client/BitbucketServerInvoker.java

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static com.google.common.base.Charsets.UTF_8;
44
import static com.google.common.base.Strings.isNullOrEmpty;
55

6+
import com.google.common.base.Throwables;
67
import java.io.BufferedReader;
78
import java.io.IOException;
89
import java.io.InputStreamReader;
@@ -11,9 +12,7 @@
1112
import java.net.CookieManager;
1213
import java.net.CookiePolicy;
1314
import java.net.URI;
14-
1515
import javax.xml.bind.DatatypeConverter;
16-
1716
import org.apache.http.HttpResponse;
1817
import org.apache.http.client.HttpClient;
1918
import org.apache.http.client.config.RequestConfig;
@@ -24,8 +23,6 @@
2423
import org.apache.http.entity.StringEntity;
2524
import org.apache.http.impl.client.HttpClientBuilder;
2625

27-
import com.google.common.base.Throwables;
28-
2926
public class BitbucketServerInvoker {
3027

3128
public enum Method {
@@ -78,18 +75,18 @@ private String doInvokeUrl(
7875
// Preparation of the request
7976
HttpRequestBase request;
8077
switch (method) {
81-
case DELETE:
82-
request = new HttpDelete();
83-
break;
84-
case GET:
85-
request = new HttpGet();
86-
break;
87-
case POST:
88-
request = new HttpPost();
89-
break;
90-
default:
91-
throw new IllegalArgumentException(
92-
"Unsupported http method:\n" + url + "\n" + method + "\n" + postContent);
78+
case DELETE:
79+
request = new HttpDelete();
80+
break;
81+
case GET:
82+
request = new HttpGet();
83+
break;
84+
case POST:
85+
request = new HttpPost();
86+
break;
87+
default:
88+
throw new IllegalArgumentException(
89+
"Unsupported http method:\n" + url + "\n" + method + "\n" + postContent);
9390
}
9491
request.setURI(new URI(url));
9592
RequestConfig.Builder requestBuilder =

0 commit comments

Comments
 (0)