From ba7353eb7324dc759f7f2238ac94e167b35af473 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 8 Jul 2016 15:54:10 +0200 Subject: [PATCH] Fix Quality flaws --- .../main/java/org/sonar/server/issue/index/IssueIndex.java | 2 +- .../java/org/sonar/db/version/v60/DropTreesOfSnapshots.java | 4 ++-- .../sonar/db/version/v60/PopulateAnalysisUuidOnMeasures.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java index 24289e2b7b0..3be66691e4e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java @@ -245,7 +245,7 @@ public class IssueIndex extends BaseIndex { } } - private void configurePagination(SearchOptions options, SearchRequestBuilder esSearch) { + private static void configurePagination(SearchOptions options, SearchRequestBuilder esSearch) { esSearch.setFrom(options.getOffset()).setSize(options.getLimit()); } diff --git a/sonar-db/src/main/java/org/sonar/db/version/v60/DropTreesOfSnapshots.java b/sonar-db/src/main/java/org/sonar/db/version/v60/DropTreesOfSnapshots.java index 07a5ac553ce..c5918a50e0d 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/v60/DropTreesOfSnapshots.java +++ b/sonar-db/src/main/java/org/sonar/db/version/v60/DropTreesOfSnapshots.java @@ -38,10 +38,10 @@ public class DropTreesOfSnapshots extends BaseDataChange { massUpdate.select("select id from snapshots where depth > 0"); massUpdate.update("delete from snapshots where id=?"); massUpdate.rowPluralName("snapshots"); - massUpdate.execute(this::handle); + massUpdate.execute(DropTreesOfSnapshots::handle); } - private boolean handle(Select.Row row, SqlStatement update) throws SQLException { + private static boolean handle(Select.Row row, SqlStatement update) throws SQLException { long id = row.getLong(1); update.setLong(1, id); return true; diff --git a/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateAnalysisUuidOnMeasures.java b/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateAnalysisUuidOnMeasures.java index e81abe6b4b9..0e87df1e860 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateAnalysisUuidOnMeasures.java +++ b/sonar-db/src/main/java/org/sonar/db/version/v60/PopulateAnalysisUuidOnMeasures.java @@ -42,10 +42,10 @@ public class PopulateAnalysisUuidOnMeasures extends BaseDataChange { "where m.analysis_uuid is null"); massUpdate.update("update project_measures set analysis_uuid=? where snapshot_id=? and analysis_uuid is null"); massUpdate.rowPluralName("measures"); - massUpdate.execute(this::handle); + massUpdate.execute(PopulateAnalysisUuidOnMeasures::handle); } - private boolean handle(Select.Row row, SqlStatement update) throws SQLException { + private static boolean handle(Select.Row row, SqlStatement update) throws SQLException { long snapshotId = row.getLong(1); String analysisUuid = row.getString(2); -- 2.39.5