aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-15 06:51:30 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-15 06:51:30 +0000
commit00a21e0a65e4ec42d4b97ae466abec925e89000b (patch)
treeb2542e371ce6c63547864d6c0127e4b7d4538f0d /plugins
parent2b69c849ecddd36c632d9834cd190d4ad0447766 (diff)
downloadsonarqube-00a21e0a65e4ec42d4b97ae466abec925e89000b.tar.gz
sonarqube-00a21e0a65e4ec42d4b97ae466abec925e89000b.zip
Do not keep DSM measure in cache
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java
index 0f040a975a4..103c0b95fc5 100644
--- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java
+++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java
@@ -25,6 +25,7 @@ import org.sonar.api.batch.DecoratorContext;
import org.sonar.api.batch.SonarIndex;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Measure;
+import org.sonar.api.measures.PersistenceMode;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import org.sonar.api.resources.ResourceUtils;
@@ -63,7 +64,9 @@ public class ProjectDsmDecorator implements Decorator {
}
private void saveDsm(DecoratorContext context, Dsm<Resource> dsm) {
- context.saveMeasure(new Measure(CoreMetrics.DEPENDENCY_MATRIX, DsmSerializer.serialize(dsm)));
+ Measure measure = new Measure(CoreMetrics.DEPENDENCY_MATRIX, DsmSerializer.serialize(dsm));
+ measure.setPersistenceMode(PersistenceMode.DATABASE);
+ context.saveMeasure(measure);
}
private Dsm<Resource> getDsm(Collection<Resource> subProjects) {