From 6358f483146da56ef2893d109d347be10f5b342a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 2 Feb 2017 16:50:28 +0100 Subject: [PATCH] Fix Quality flaws --- .../main/java/org/sonar/server/issue/index/IssueIndexer.java | 1 - .../src/main/java/org/sonar/server/platform/BackendCleanup.java | 2 +- .../src/main/java/org/sonar/server/test/index/TestIndexer.java | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) 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; -- 2.39.5