aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DatabaseBatchCompatibility.java
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-batch/src/main/java/org/sonar/batch/bootstrap/DatabaseBatchCompatibility.java')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/DatabaseBatchCompatibility.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DatabaseBatchCompatibility.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DatabaseBatchCompatibility.java
index 45aaf4180c1..ebe8342d221 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DatabaseBatchCompatibility.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/DatabaseBatchCompatibility.java
@@ -49,14 +49,7 @@ public class DatabaseBatchCompatibility implements BatchComponent {
}
private void checkCorrectServerId() {
- String remoteServerId;
- try {
- remoteServerId = server.getServerId();
- } catch (IOException e) {
- throw new SonarException("Impossible to get the ID of the remote server: " + server.getURL(), e);
- }
-
- if (!version.getSonarCoreId().equals(remoteServerId)) {
+ if (!version.getSonarCoreId().equals(server.getServerId())) {
StringBuilder message = new StringBuilder("The current batch process and the configured remote server do not share the same DB configuration.\n");
message.append("\t- Batch side: ");
message.append(settings.getString(DatabaseProperties.PROP_URL));