aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main/java/org/sonar
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-01-27 10:50:00 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2015-01-27 17:41:04 +0100
commitedb5e139309f4ce46a9dcd30813ae7a56b9761a1 (patch)
tree492317efaee78eee8f52f5e5e6cc50aa6139a437 /sonar-application/src/main/java/org/sonar
parent746d948321ab881fe0e6d907db43b2d69877509c (diff)
downloadsonarqube-edb5e139309f4ce46a9dcd30813ae7a56b9761a1.tar.gz
sonarqube-edb5e139309f4ce46a9dcd30813ae7a56b9761a1.zip
SONAR-6088 Remove old preview/h2 mode
Diffstat (limited to 'sonar-application/src/main/java/org/sonar')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/JdbcSettings.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java b/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java
index 4a34e55a642..c949b1fae45 100644
--- a/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java
+++ b/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java
@@ -26,8 +26,6 @@ import org.sonar.process.MessageException;
import org.sonar.process.ProcessConstants;
import org.sonar.process.Props;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -37,12 +35,12 @@ import java.util.regex.Pattern;
public class JdbcSettings {
static enum Provider {
- H2(null), JTDS("lib/jdbc/jtds"), MYSQL("lib/jdbc/mysql"), ORACLE("extensions/jdbc-driver/oracle"),
+ H2("lib/jdbc/h2"), JTDS("lib/jdbc/jtds"), MYSQL("lib/jdbc/mysql"), ORACLE("extensions/jdbc-driver/oracle"),
POSTGRESQL("lib/jdbc/postgresql");
final String path;
- Provider(@Nullable String path) {
+ Provider(String path) {
this.path = path;
}
}
@@ -52,17 +50,11 @@ public class JdbcSettings {
Provider provider = driverProvider(url);
checkUrlParameters(provider, url);
String driverPath = driverPath(homeDir, provider);
- if (driverPath != null) {
- props.set(ProcessConstants.JDBC_DRIVER_PATH, driverPath);
- }
+ props.set(ProcessConstants.JDBC_DRIVER_PATH, driverPath);
}
- @CheckForNull
String driverPath(File homeDir, Provider provider) {
String dirPath = provider.path;
- if (dirPath == null) {
- return null;
- }
File dir = new File(homeDir, dirPath);
if (!dir.exists()) {
throw new MessageException("Directory does not exist: " + dirPath);