aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-squid-java-plugin/src
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-15 06:52:12 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-15 06:52:12 +0000
commit84b7c5e10a695521176026edc0fc03342d887cb7 (patch)
tree1f58fa4b3563279960c7e2d7c1c3e16b7e16d1ea /plugins/sonar-squid-java-plugin/src
parent00a21e0a65e4ec42d4b97ae466abec925e89000b (diff)
downloadsonarqube-84b7c5e10a695521176026edc0fc03342d887cb7.tar.gz
sonarqube-84b7c5e10a695521176026edc0fc03342d887cb7.zip
Do not keep DSM measure in cache
Diffstat (limited to 'plugins/sonar-squid-java-plugin/src')
-rw-r--r--plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java
index 30c994c3896..ef98f42a769 100644
--- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java
+++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java
@@ -19,10 +19,6 @@
*/
package org.sonar.plugins.squid.bridges;
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.batch.SensorContext;
@@ -30,21 +26,21 @@ import org.sonar.api.design.Dependency;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Measure;
import org.sonar.api.measures.Metric;
+import org.sonar.api.measures.PersistenceMode;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import org.sonar.api.utils.TimeProfiler;
-import org.sonar.graph.Cycle;
-import org.sonar.graph.Dsm;
-import org.sonar.graph.DsmTopologicalSorter;
-import org.sonar.graph.Edge;
-import org.sonar.graph.IncrementalCyclesAndFESSolver;
-import org.sonar.graph.MinimumFeedbackEdgeSetSolver;
+import org.sonar.graph.*;
import org.sonar.squid.Squid;
import org.sonar.squid.api.SourceCode;
import org.sonar.squid.api.SourceCodeEdge;
import org.sonar.squid.api.SourcePackage;
import org.sonar.squid.api.SourceProject;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
public class DesignBridge extends Bridge {
private static final Logger LOG = LoggerFactory.getLogger(DesignBridge.class);
@@ -80,7 +76,8 @@ public class DesignBridge extends Bridge {
savePositiveMeasure(sonarProject, CoreMetrics.PACKAGE_EDGES_WEIGHT, getEdgesWeight(squidPackages), false);
String dsmJson = serializeDsm(squid, squidPackages, feedbackEdges);
- context.saveMeasure(sonarProject, new Measure(CoreMetrics.DEPENDENCY_MATRIX, dsmJson));
+ Measure dsmMeasure = new Measure(CoreMetrics.DEPENDENCY_MATRIX, dsmJson).setPersistenceMode(PersistenceMode.DATABASE);
+ context.saveMeasure(sonarProject, dsmMeasure);
profiler.stop();
}