]> source.dussan.org Git - gitblit.git/commitdiff
Changed using ConnectionUtils
authormallowlabs <mallowlabs@gmail.com>
Sat, 8 Sep 2012 14:47:53 +0000 (23:47 +0900)
committermallowlabs <mallowlabs@gmail.com>
Sat, 8 Sep 2012 14:47:53 +0000 (23:47 +0900)
src/com/gitblit/RedmineUserService.java

index 93d1af854d7d308c68628fd33908f7320b10776f..6ff61c7310bae577b7fbd6e1dbae6b9935bdaddd 100644 (file)
@@ -4,13 +4,13 @@ import java.io.File;
 import java.io.IOException;\r
 import java.io.InputStreamReader;\r
 import java.net.HttpURLConnection;\r
-import java.net.URL;\r
 \r
 import org.apache.wicket.util.io.IOUtils;\r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
 import com.gitblit.models.UserModel;\r
+import com.gitblit.utils.ConnectionUtils;\r
 import com.google.gson.Gson;\r
 \r
 /**\r
@@ -109,8 +109,8 @@ public class RedmineUserService extends GitblitUserService {
             return testingJson;\r
         }\r
 \r
-        URL apiUrl = new URL(url + "users/current.json?key=" + apiKey);\r
-        HttpURLConnection http = (HttpURLConnection) apiUrl.openConnection();\r
+        String apiUrl = url + "users/current.json?key=" + apiKey;\r
+        HttpURLConnection http = (HttpURLConnection) ConnectionUtils.openConnection(apiUrl, null, null);\r
         http.setRequestMethod("GET");\r
         http.connect();\r
         InputStreamReader reader = new InputStreamReader(http.getInputStream());\r