diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-07-08 15:54:10 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-07-11 18:32:47 +0200 |
commit | ba7353eb7324dc759f7f2238ac94e167b35af473 (patch) | |
tree | 745371a9ae046732e85b5d41ffdf768615f85079 /sonar-db | |
parent | c0fc296133ab2c1f6b4b2f1fddf7e1afa26b426e (diff) | |
download | sonarqube-ba7353eb7324dc759f7f2238ac94e167b35af473.tar.gz sonarqube-ba7353eb7324dc759f7f2238ac94e167b35af473.zip |
Fix Quality flaws
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/version/v60/DropTreesOfSnapshots.java | 4 | ||||
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/version/v60/PopulateAnalysisUuidOnMeasures.java | 4 |
2 files changed, 4 insertions, 4 deletions
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); |