aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
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) {