diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-29 00:00:04 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-29 00:00:04 +0200 |
commit | 5af0e0779610017b6056b63278e1a16c6d49d25b (patch) | |
tree | 8908d360e2155f8145605d05d700cb1fac3a05a1 /sonar-batch/src | |
parent | 4bee8f9892ddda7497187edc97c08d1935069a98 (diff) | |
download | sonarqube-5af0e0779610017b6056b63278e1a16c6d49d25b.tar.gz sonarqube-5af0e0779610017b6056b63278e1a16c6d49d25b.zip |
SONAR-5487 Check minimal required version of Oracle JDBC driver (11.2)
Diffstat (limited to 'sonar-batch/src')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java | 13 | ||||
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java | 2 |
2 files changed, 1 insertions, 14 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java index b639c72a988..e4944f5bd5d 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java @@ -29,10 +29,7 @@ import java.util.Properties; */ public class BatchDatabase extends DefaultDatabase { - private final AnalysisMode analysisMode; - public BatchDatabase(Settings settings, - AnalysisMode analysisMode, // The dependency on JdbcDriverHolder is required to be sure that the JDBC driver // has been downloaded and injected into classloader JdbcDriverHolder jdbcDriverHolder, @@ -41,16 +38,13 @@ public class BatchDatabase extends DefaultDatabase { // changed settings PreviewDatabase dryRun) { super(settings); - this.analysisMode = analysisMode; } public BatchDatabase(Settings settings, - AnalysisMode analysisMode, // The dependency on JdbcDriverHolder is required to be sure that the JDBC driver // has been downloaded and injected into classloader JdbcDriverHolder jdbcDriverHolder) { super(settings); - this.analysisMode = analysisMode; } @Override @@ -63,11 +57,4 @@ public class BatchDatabase extends DefaultDatabase { // SONAR-2965 properties.setProperty("sonar.jdbc.defaultAutoCommit", "false"); } - - @Override - protected void checkH2Database() { - if (!analysisMode.isPreview()) { - super.checkH2Database(); - } - } } diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java index 816af411aed..63236587eed 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchDatabaseTest.java @@ -30,7 +30,7 @@ import static org.mockito.Mockito.mock; public class BatchDatabaseTest { @Test public void should_init_at_least_two_connections() { - BatchDatabase db = new BatchDatabase(new Settings(), mock(AnalysisMode.class), mock(JdbcDriverHolder.class), mock(PreviewDatabase.class)); + BatchDatabase db = new BatchDatabase(new Settings(), mock(JdbcDriverHolder.class), mock(PreviewDatabase.class)); Properties props = new Properties(); db.doCompleteProperties(props); |