diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-03-27 09:20:44 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-03-27 09:26:11 +0100 |
commit | 7bad03950e4ec3e82a5fef2ef50867a2e4ac29e2 (patch) | |
tree | e8c2f4f586bafe536fb80d396565715818c4b11d /plugins | |
parent | 8218494577a870ae3ef81997f3a17da50d199403 (diff) | |
download | sonarqube-7bad03950e4ec3e82a5fef2ef50867a2e4ac29e2.tar.gz sonarqube-7bad03950e4ec3e82a5fef2ef50867a2e4ac29e2.zip |
Fix some quality flaws
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java index 38083fed3db..169246a096f 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java @@ -19,9 +19,6 @@ */ package org.sonar.plugins.core.timemachine; -import org.sonar.batch.components.TimeMachineConfiguration; - -import org.sonar.batch.components.PastSnapshot; import org.sonar.api.batch.Decorator; import org.sonar.api.batch.DecoratorBarriers; import org.sonar.api.batch.DecoratorContext; @@ -31,6 +28,8 @@ import org.sonar.api.database.model.Snapshot; import org.sonar.api.resources.Project; import org.sonar.api.resources.Resource; import org.sonar.api.resources.ResourceUtils; +import org.sonar.batch.components.PastSnapshot; +import org.sonar.batch.components.TimeMachineConfiguration; import org.sonar.batch.index.ResourceCache; import java.util.List; @@ -59,7 +58,7 @@ public final class TimeMachineConfigurationPersister implements Decorator { void persistConfiguration(Resource module) { List<PastSnapshot> pastSnapshots = timeMachineConfiguration.getProjectPastSnapshots(); - Snapshot projectSnapshot = resourceCache.get(module.getEffectiveKey()).snapshot(); + Snapshot projectSnapshot = resourceCache.get(module).snapshot(); for (PastSnapshot pastSnapshot : pastSnapshots) { Snapshot snapshot = session.reattach(Snapshot.class, projectSnapshot.getId()); updatePeriodParams(snapshot, pastSnapshot); |