aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-06 09:57:19 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-07 12:12:32 +0200
commita2be8c1b0c660f10b2e86ac046af3cfaea61214d (patch)
treea21057b61d9fb834c5c751e6f88021632d7fbcc3 /sonar-scanner-engine/src/main/java/org
parentf6bfd1d2f0373da2d2929d9217721a81fc3afe5d (diff)
downloadsonarqube-a2be8c1b0c660f10b2e86ac046af3cfaea61214d.tar.gz
sonarqube-a2be8c1b0c660f10b2e86ac046af3cfaea61214d.zip
SONAR-6948 Ability for Java server extensions to call web services
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java
index d33baf821e5..5cd52b3419c 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java
@@ -24,7 +24,7 @@ import org.sonar.api.CoreProperties;
import org.sonar.api.batch.BatchSide;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
import org.sonarqube.ws.client.HttpConnector;
-import org.sonarqube.ws.client.HttpWsClient;
+import org.sonarqube.ws.client.WsClientFactories;
import static java.lang.Integer.parseInt;
import static java.lang.String.valueOf;
@@ -42,20 +42,20 @@ public class BatchWsClientProvider extends ProviderAdapter {
public synchronized BatchWsClient provide(final GlobalProperties settings, final EnvironmentInformation env) {
if (wsClient == null) {
String url = defaultIfBlank(settings.property("sonar.host.url"), CoreProperties.SERVER_BASE_URL_DEFAULT_VALUE);
- HttpConnector.Builder builder = new HttpConnector.Builder();
+ HttpConnector.Builder connectorBuilder = HttpConnector.newBuilder();
// TODO proxy
String timeoutSec = defaultIfBlank(settings.property(READ_TIMEOUT_SEC_PROPERTY), valueOf(DEFAULT_READ_TIMEOUT_SEC));
String login = defaultIfBlank(settings.property(CoreProperties.LOGIN), null);
- builder
+ connectorBuilder
.readTimeoutMilliseconds(parseInt(timeoutSec) * 1_000)
.connectTimeoutMilliseconds(CONNECT_TIMEOUT_MS)
.userAgent(env.toString())
.url(url)
.credentials(login, settings.property(CoreProperties.PASSWORD));
- wsClient = new BatchWsClient(new HttpWsClient(builder.build()), login != null);
+ wsClient = new BatchWsClient(WsClientFactories.getDefault().newClient(connectorBuilder.build()), login != null);
}
return wsClient;
}