From: Simon Brandhof Date: Fri, 29 Jun 2012 14:27:54 +0000 (+0200) Subject: Remove unused constants X-Git-Tag: 3.2~277 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6e2a854b1b28054d32b8d9c91c122f29a9487c99;p=sonarqube.git Remove unused constants --- diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java index ffca9b8b8cc..0d75ddc8070 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java @@ -19,25 +19,23 @@ */ package org.sonar.core.persistence.dialect; -import org.hamcrest.core.Is; import org.junit.Test; -import org.sonar.api.database.DatabaseProperties; import org.sonar.api.utils.SonarException; -import static org.junit.Assert.assertThat; +import static org.fest.assertions.Assertions.assertThat; public class DialectUtilsTest { @Test public void testFindById() { - Dialect d = DialectUtils.find(DatabaseProperties.DIALECT_MYSQL, null); - assertThat(d, Is.is(MySql.class)); + Dialect d = DialectUtils.find("mysql", null); + assertThat(d).isInstanceOf(MySql.class); } @Test public void testFindByJdbcUrl() { Dialect d = DialectUtils.find(null, "jdbc:mysql:foo:bar"); - assertThat(d, Is.is(MySql.class)); + assertThat(d).isInstanceOf(MySql.class); } @Test(expected = SonarException.class) diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java index b3e7aebe139..f84f9691950 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java @@ -23,7 +23,6 @@ public interface DatabaseProperties { int MAX_TEXT_SIZE = 16777215; - String PROP_ISOLATION = "sonar.jdbc.defaultTransactionIsolation"; String PROP_URL = "sonar.jdbc.url"; String PROP_URL_DEFAULT_VALUE = "jdbc:derby://localhost:1527/sonar"; String PROP_DRIVER = "sonar.jdbc.driverClassName"; @@ -37,15 +36,7 @@ public interface DatabaseProperties { String PROP_HIBERNATE_HBM2DLL = "sonar.jdbc.hibernate.hbm2ddl"; String PROP_HIBERNATE_GENERATE_STATISTICS = "sonar.jdbc.hibernate.generate_statistics"; String PROP_DIALECT = "sonar.jdbc.dialect"; - String PROP_DIALECT_CLASS = "sonar.jdbc.dialectClass"; - String PROP_EMBEDDED_PORT = "sonar.embeddedDatabase.port"; String PROP_HIBERNATE_DEFAULT_SCHEMA = "sonar.hibernate.default_schema"; String PROP_EMBEDDED_DATA_DIR = "sonar.embeddedDatabase.dataDir"; - String DIALECT_DERBY = "derby"; - String DIALECT_MYSQL = "mysql"; - String DIALECT_POSTGRESQL = "postgresql"; - String DIALECT_ORACLE = "oracle"; - String DIALECT_DB2 = "db2"; - String DIALECT_MSSQL = "mssql"; } \ No newline at end of file