diff options
author | David Gageot <david@gageot.net> | 2012-10-08 10:19:52 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-10-08 10:19:52 +0200 |
commit | 05878a9361d89e086c4ec3e2b2ebd0de0761f0a2 (patch) | |
tree | ce3606bcc1c77ea5bc49bd33449914f75be2f7a2 | |
parent | c7773cfab68b32bcba0e9a129fdb04ce43cc5774 (diff) | |
download | sonarqube-05878a9361d89e086c4ec3e2b2ebd0de0761f0a2.tar.gz sonarqube-05878a9361d89e086c4ec3e2b2ebd0de0761f0a2.zip |
SONAR-3765 Better fix
3 files changed, 2 insertions, 16 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/dialect/H2.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/H2.java index 3e572aaae35..0c80c7dc445 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/dialect/H2.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/H2.java @@ -30,7 +30,7 @@ public class H2 extends AbstractDialect { public static final String ID = "h2"; public H2() { - super(ID, "h2", "org.h2.Driver", "true", "false", "SELECT 1"); + super(ID, ".h2.", "org.h2.Driver", "true", "false", "SELECT 1"); } public Class<? extends org.hibernate.dialect.Dialect> getHibernateDialectClass() { diff --git a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java index 6c4737514d1..15a519e70f1 100644 --- a/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java +++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/H2Test.java @@ -42,7 +42,7 @@ public class H2Test { @Test public void should_configure() { assertThat(h2.getId()).isEqualTo("h2"); - assertThat(h2.getActiveRecordDialectCode()).isEqualTo("h2"); + assertThat(h2.getActiveRecordDialectCode()).isEqualTo(".h2."); assertThat(h2.getDefaultDriverClassName()).isEqualTo("org.h2.Driver"); assertThat(h2.getValidationQuery()).isEqualTo("SELECT 1"); } diff --git a/sonar-server/src/main/webapp/WEB-INF/config/initializers/better_quoting.rb b/sonar-server/src/main/webapp/WEB-INF/config/initializers/better_quoting.rb deleted file mode 100644 index 60071f649ca..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/config/initializers/better_quoting.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Override quoting for database without a specific jdbc adapter -# for example, H2 -# -# Default quoting leads to bugs, see SONAR-3765 -# -module ActiveRecord - module ConnectionAdapters # :nodoc: - module Quoting - def quote_string(s) - s.gsub(/'/, "''") # ' (for ruby-mode) - end - end - end -end |