aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-10-31 09:56:46 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-10-31 09:57:14 +0100
commit12f8b68ca310b44d1e5795ae14c8e152d57036d9 (patch)
treeaf40aa4c97ef904e457017e98705034e7be176cb /sonar-batch
parent416679f465a455779219f09fc466dfa173f1003e (diff)
downloadsonarqube-12f8b68ca310b44d1e5795ae14c8e152d57036d9.tar.gz
sonarqube-12f8b68ca310b44d1e5795ae14c8e152d57036d9.zip
Do not inject multiple org.sonar.api.platform.Server on batch side
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java
index 7b643b2c541..9f7490501bc 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java
@@ -44,9 +44,10 @@ import java.text.SimpleDateFormat;
import java.util.Date;
/**
+ * TODO extends Server when removing the deprecated org.sonar.batch.ServerMetadata
* @since 3.4
*/
-public class ServerClient extends Server implements BatchComponent {
+public class ServerClient implements BatchComponent {
private Settings settings;
private HttpDownloader.BaseHttpDownloader downloader;
@@ -55,17 +56,14 @@ public class ServerClient extends Server implements BatchComponent {
this.downloader = new HttpDownloader.BaseHttpDownloader(settings, env.toString());
}
- @Override
public String getId() {
return settings.getString(CoreProperties.SERVER_ID);
}
- @Override
public String getVersion() {
return settings.getString(CoreProperties.SERVER_VERSION);
}
- @Override
public Date getStartedAt() {
String dateString = settings.getString(CoreProperties.SERVER_STARTTIME);
if (dateString != null) {
@@ -79,12 +77,10 @@ public class ServerClient extends Server implements BatchComponent {
return null;
}
- @Override
public String getURL() {
return StringUtils.removeEnd(StringUtils.defaultIfBlank(settings.getString("sonar.host.url"), "http://localhost:9000"), "/");
}
- @Override
public String getPermanentServerId() {
return settings.getString(CoreProperties.PERMANENT_SERVER_ID);
}