diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-12-12 11:51:24 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-12-12 11:51:24 +0100 |
commit | dceec13d5c22aaa67f9f19d6196b3ae4330b23ff (patch) | |
tree | 6acec7e8f0d4013c1e7afb1455617f901a56bf82 /plugins/sonar-dbcleaner-plugin/src/main | |
parent | 5c1cabf8355199f03924bbabf34f98b315a01f51 (diff) | |
download | sonarqube-dceec13d5c22aaa67f9f19d6196b3ae4330b23ff.tar.gz sonarqube-dceec13d5c22aaa67f9f19d6196b3ae4330b23ff.zip |
Fix some violations
Diffstat (limited to 'plugins/sonar-dbcleaner-plugin/src/main')
-rw-r--r-- | plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java index 790a4f96a37..168d97fea21 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java @@ -47,8 +47,9 @@ public final class PurgeRuleMeasures extends Purge { } private void purge(Integer sid) { - Query query = getSession().createQuery("SELECT m.id FROM " + MeasureModel.class.getSimpleName() + " m, " + Snapshot.class.getSimpleName() + " s WHERE s.id = m.snapshotId and " + - "(s.rootId=:rootSid OR s.id=:rootSid) and m.ruleId is not null"); + Query query = getSession().createQuery( + "SELECT m.id FROM " + MeasureModel.class.getSimpleName() + " m, " + Snapshot.class.getSimpleName() + " s " + + " WHERE s.id = m.snapshotId AND (s.rootId=:rootSid OR s.id=:rootSid) and m.ruleId is not null"); query.setParameter("rootSid", sid); List<Integer> measureIds = query.getResultList(); PurgeUtils.deleteMeasuresById(getSession(), measureIds); |