diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-09-30 12:17:19 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-09-30 12:17:19 +0200 |
commit | 7a9d22a005d1f0b80a161149c967f149576a46ac (patch) | |
tree | 3551536131c481b1905f7f22f62b66f59559e971 /sonar-db | |
parent | adcaa85706df94a86e4c0ab7d54c1a490368daca (diff) | |
download | sonarqube-7a9d22a005d1f0b80a161149c967f149576a46ac.tar.gz sonarqube-7a9d22a005d1f0b80a161149c967f149576a46ac.zip |
SONAR-6886 Stop support of deprecated property sonar.jdbc.user
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java | 10 | ||||
-rw-r--r-- | sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java | 12 |
2 files changed, 1 insertions, 21 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java b/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java index cf71253f7f5..7bb864230f2 100644 --- a/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java +++ b/sonar-db/src/main/java/org/sonar/db/DefaultDatabase.java @@ -75,7 +75,7 @@ public class DefaultDatabase implements Database { void initSettings() { properties = new Properties(); completeProperties(settings, properties, SONAR_JDBC); - completeDefaultProperties(properties); + completeDefaultProperty(properties, DatabaseProperties.PROP_URL, DEFAULT_URL); doCompleteProperties(properties); dialect = DialectUtils.find(properties.getProperty(SONAR_JDBC_DIALECT), properties.getProperty(SONAR_JDBC_URL)); @@ -160,14 +160,6 @@ public class DefaultDatabase implements Database { return result; } - private static void completeDefaultProperties(Properties props) { - completeDefaultProperty(props, DatabaseProperties.PROP_URL, DEFAULT_URL); - - if (props.getProperty(DatabaseProperties.PROP_USER_DEPRECATED) != null) { - completeDefaultProperty(props, DatabaseProperties.PROP_USER, props.getProperty(DatabaseProperties.PROP_USER_DEPRECATED)); - } - } - private static void completeDefaultProperty(Properties props, String key, String defaultValue) { if (props.getProperty(key) == null) { props.setProperty(key, defaultValue); diff --git a/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java b/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java index 0d0c4ee1ad6..7eb9ad8e8a8 100644 --- a/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java +++ b/sonar-db/src/test/java/org/sonar/db/DefaultDatabaseTest.java @@ -41,18 +41,6 @@ public class DefaultDatabaseTest { } @Test - public void shouldSupportDeprecatedUserProperty() { - Settings settings = new Settings(); - settings.setProperty("sonar.jdbc.user", "me"); - - DefaultDatabase db = new DefaultDatabase(settings); - db.initSettings(); - Properties props = db.getProperties(); - - assertThat(props.getProperty("sonar.jdbc.username")).isEqualTo("me"); - } - - @Test public void shouldExtractCommonsDbcpProperties() { Properties props = new Properties(); props.setProperty("sonar.jdbc.driverClassName", "my.Driver"); |