File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/se/bjurr/violations/comments/bitbucketserver/lib/client Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 33import static com .google .common .base .Charsets .UTF_8 ;
44import static com .google .common .base .Strings .isNullOrEmpty ;
55
6- import com .google .common .base .Throwables ;
76import java .io .BufferedReader ;
87import java .io .IOException ;
98import java .io .InputStreamReader ;
1312import java .net .CookiePolicy ;
1413import java .net .HttpURLConnection ;
1514import java .net .URL ;
15+
1616import javax .xml .bind .DatatypeConverter ;
1717
18+ import com .google .common .base .Throwables ;
19+
1820public class BitbucketServerInvoker {
1921
2022 public enum Method {
@@ -35,6 +37,8 @@ public String invokeUrl(
3537 try {
3638 CookieHandler .setDefault (new CookieManager (null , CookiePolicy .ACCEPT_ALL ));
3739 conn = (HttpURLConnection ) new URL (url ).openConnection ();
40+ conn .setReadTimeout (30000 );
41+ conn .setConnectTimeout (30000 );
3842 final String userAndPass = bitbucketServerUser + ":" + bitbucketServerPassword ;
3943 final String authString = DatatypeConverter .printBase64Binary (userAndPass .getBytes ("UTF-8" ));
4044 conn .setRequestProperty ("Authorization" , "Basic " + authString );
You can’t perform that action at this time.
0 commit comments