From: Simon Brandhof Date: Thu, 2 Feb 2017 15:50:28 +0000 (+0100) Subject: Fix Quality flaws X-Git-Tag: 6.3-RC1~239 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6358f483146da56ef2893d109d347be10f5b342a;p=sonarqube.git Fix Quality flaws --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndexer.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndexer.java index 67e8c731d49..074e7a8f4a3 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndexer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndexer.java @@ -76,7 +76,6 @@ public class IssueIndexer extends BaseIndexer implements ProjectIndexer, NeedAut switch (cause) { case PROJECT_CREATION: // nothing to do, issues do not exist at project creation - break; case PROJECT_KEY_UPDATE: // nothing to do, project key is not used in this index break; diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/BackendCleanup.java b/server/sonar-server/src/main/java/org/sonar/server/platform/BackendCleanup.java index 77e1fcfb6da..a74305d6973 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/BackendCleanup.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/BackendCleanup.java @@ -120,7 +120,7 @@ public class BackendCleanup { clearIndex(ComponentIndexDefinition.INDEX_COMPONENTS); } - private void truncateAnalysisTables(Connection connection) throws SQLException { + private static void truncateAnalysisTables(Connection connection) throws SQLException { try (Statement statement = connection.createStatement()) { // Clear inspection tables for (String table : ANALYSIS_TABLES) { diff --git a/server/sonar-server/src/main/java/org/sonar/server/test/index/TestIndexer.java b/server/sonar-server/src/main/java/org/sonar/server/test/index/TestIndexer.java index 81decd148ec..1c1aa4c443c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/test/index/TestIndexer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/test/index/TestIndexer.java @@ -55,7 +55,6 @@ public class TestIndexer extends BaseIndexer implements ProjectIndexer { switch (cause) { case PROJECT_CREATION: // no need to index, not tests at that time - break; case PROJECT_KEY_UPDATE: // no need to index, project key is not used break;