From 021db4f2a3a7fab4f850f0fc715f21503e0fc3ab Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 15 Oct 2012 15:34:34 +0200 Subject: [PATCH] Fix quality flaws --- .../java/org/sonar/core/persistence/DefaultDatabase.java | 8 ++++++-- .../src/main/java/org/sonar/server/ui/JRubyFacade.java | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java b/sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java index 54744b10b6f..d12f3fa1e49 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java @@ -28,12 +28,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.config.Settings; import org.sonar.api.database.DatabaseProperties; -import org.sonar.core.persistence.dialect.*; +import org.sonar.core.persistence.dialect.Dialect; +import org.sonar.core.persistence.dialect.DialectUtils; +import org.sonar.core.persistence.dialect.H2; +import org.sonar.core.persistence.dialect.Oracle; +import org.sonar.core.persistence.dialect.PostgreSql; import org.sonar.jpa.session.CustomHibernateConnectionProvider; import javax.sql.DataSource; + import java.sql.SQLException; -import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Properties; diff --git a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java index 9f52e40f9b1..7fa81d9328e 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java @@ -21,6 +21,7 @@ package org.sonar.server.ui; import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; +import org.json.simple.parser.ParseException; import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; import org.sonar.api.config.License; @@ -83,7 +84,7 @@ public final class JRubyFacade { return getContainer().getComponentByType(componentType); } - public List executeMeasureFilter(String json, @Nullable Long userId) throws Exception { + public List executeMeasureFilter(String json, @Nullable Long userId) throws ParseException { return get(MeasureFilterEngine.class).execute(json, userId); } -- 2.39.5