aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-11-02 09:48:14 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-11-02 09:48:14 +0000
commit58bf8f1f205bd01dc8bcd363e9a15abeed573776 (patch)
tree16da9105e1d22280d346d9d2c00d137b9b92084b /sonar-batch
parent4e0a9182aa9f57d9bd26abdc242e41538d338ef1 (diff)
downloadsonarqube-58bf8f1f205bd01dc8bcd363e9a15abeed573776.tar.gz
sonarqube-58bf8f1f205bd01dc8bcd363e9a15abeed573776.zip
add the method getURL() to org.sonar.api.platform.Server
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/BatchPluginRepository.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/FinalizeSnapshotsJob.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/RemoteClassLoader.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java6
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java4
5 files changed, 8 insertions, 8 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/BatchPluginRepository.java b/sonar-batch/src/main/java/org/sonar/batch/BatchPluginRepository.java
index 97e3393aa05..98d3e114f21 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/BatchPluginRepository.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/BatchPluginRepository.java
@@ -55,7 +55,7 @@ public class BatchPluginRepository extends AbstractPluginRepository {
public BatchPluginRepository(JpaPluginDao dao, ServerMetadata server) {
this.dao = dao;
- this.baseUrl = server.getUrl() + "/deploy/plugins/";
+ this.baseUrl = server.getURL() + "/deploy/plugins/";
}
/**
diff --git a/sonar-batch/src/main/java/org/sonar/batch/FinalizeSnapshotsJob.java b/sonar-batch/src/main/java/org/sonar/batch/FinalizeSnapshotsJob.java
index e1763c5f403..46bdb418441 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/FinalizeSnapshotsJob.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/FinalizeSnapshotsJob.java
@@ -74,7 +74,7 @@ public class FinalizeSnapshotsJob implements CoreJob {
boolean isLast = (previousLastSnapshot == null || previousLastSnapshot.getCreatedAt().before(rootSnapshot.getCreatedAt()));
setFlags(rootSnapshot, isLast, Snapshot.STATUS_PROCESSED);
- LoggerFactory.getLogger(getClass()).info("ANALYSIS SUCCESSFUL, you can browse {}", server.getUrl());
+ LoggerFactory.getLogger(getClass()).info("ANALYSIS SUCCESSFUL, you can browse {}", server.getURL());
}
private void setFlags(Snapshot snapshot, boolean last, String status) {
diff --git a/sonar-batch/src/main/java/org/sonar/batch/RemoteClassLoader.java b/sonar-batch/src/main/java/org/sonar/batch/RemoteClassLoader.java
index 09987c09ecb..31f0611d88e 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/RemoteClassLoader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/RemoteClassLoader.java
@@ -57,7 +57,7 @@ public class RemoteClassLoader {
}
public static RemoteClassLoader createForJdbcDriver(Configuration conf) {
- String baseUrl = ServerMetadata.getUrl(conf);
+ String baseUrl = ServerMetadata.getURL(conf);
String url = baseUrl + "/deploy/jdbc-driver.jar";
try {
return new RemoteClassLoader(new URL[]{new URL(url)});
diff --git a/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java b/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java
index d06e9212e91..a88337a0824 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java
@@ -39,7 +39,7 @@ public class ServerMetadata extends Server {
public ServerMetadata(Configuration conf) {
id = conf.getString(CoreProperties.SERVER_ID);
version = conf.getString(CoreProperties.SERVER_VERSION);
- url = getUrl(conf);
+ url = getURL(conf);
String dateString = conf.getString(CoreProperties.SERVER_STARTTIME);
if (dateString!=null) {
try {
@@ -51,7 +51,7 @@ public class ServerMetadata extends Server {
}
}
- public static String getUrl(Configuration conf) {
+ public static String getURL(Configuration conf) {
return StringUtils.removeEnd(conf.getString("sonar.host.url", "http://localhost:9000"), "/");
}
@@ -67,7 +67,7 @@ public class ServerMetadata extends Server {
return startTime;
}
- public String getUrl() {
+ public String getURL() {
return url;
}
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java b/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java
index cef7537c63a..7e4d8d2d6f9 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java
@@ -43,7 +43,7 @@ public class ServerMetadataTest {
assertThat(server.getId(), is("123"));
assertThat(server.getVersion(), is("2.2"));
assertThat(server.getStartedAt().getDate(), is(18));
- assertThat(server.getUrl(), is("http://foo.com"));
+ assertThat(server.getURL(), is("http://foo.com"));
}
/**
@@ -56,6 +56,6 @@ public class ServerMetadataTest {
conf.setProperty("sonar.host.url", "http://localhost:80/");
ServerMetadata server = new ServerMetadata(conf);
- assertThat(server.getUrl(), is("http://localhost:80"));
+ assertThat(server.getURL(), is("http://localhost:80"));
}
}