aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2014-11-19 11:15:05 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2014-11-19 11:15:05 +0100
commit357eb9859039ff00f6cee81f39ab676c58914673 (patch)
tree6b1df14dd916dd6326d290d7446a4433bafb73af /sonar-core/src
parentb3c6b505577dfd10a397dab6cb467cc4941e3855 (diff)
downloadsonarqube-357eb9859039ff00f6cee81f39ab676c58914673.tar.gz
sonarqube-357eb9859039ff00f6cee81f39ab676c58914673.zip
SONAR-5628 add medium test
Diffstat (limited to 'sonar-core/src')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java12
-rw-r--r--sonar-core/src/main/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTask.java2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/purge/PurgeConfiguration.java2
3 files changed, 14 insertions, 2 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java b/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java
index 0a25f91081a..719cd46ba12 100644
--- a/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/component/ComponentDto.java
@@ -243,4 +243,16 @@ public class ComponentDto extends Dto<String> implements Component {
public int hashCode() {
return id.hashCode();
}
+
+ @Override
+ public ComponentDto setCreatedAt(Date datetime) {
+ super.setCreatedAt(datetime);
+ return this;
+ }
+
+ @Override
+ public ComponentDto setUpdatedAt(Date datetime) {
+ super.setUpdatedAt(datetime);
+ return this;
+ }
}
diff --git a/sonar-core/src/main/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTask.java b/sonar-core/src/main/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTask.java
index b405f04ae66..51128905fa0 100644
--- a/sonar-core/src/main/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTask.java
+++ b/sonar-core/src/main/java/org/sonar/core/computation/dbcleaner/DefaultPurgeTask.java
@@ -103,6 +103,6 @@ public class DefaultPurgeTask implements PurgeTask {
}
public PurgeConfiguration newPurgeConfigurationOnResource(long resourceId) {
- return newDefaultPurgeConfiguration(resourceId, settings);
+ return newDefaultPurgeConfiguration(settings, resourceId);
}
}
diff --git a/sonar-core/src/main/java/org/sonar/core/purge/PurgeConfiguration.java b/sonar-core/src/main/java/org/sonar/core/purge/PurgeConfiguration.java
index 1078be70dbd..d3fc9c1c4bd 100644
--- a/sonar-core/src/main/java/org/sonar/core/purge/PurgeConfiguration.java
+++ b/sonar-core/src/main/java/org/sonar/core/purge/PurgeConfiguration.java
@@ -49,7 +49,7 @@ public class PurgeConfiguration {
this.system2 = system2;
}
- public static PurgeConfiguration newDefaultPurgeConfiguration(long resourceId, Settings settings) {
+ public static PurgeConfiguration newDefaultPurgeConfiguration(Settings settings, long resourceId) {
String[] scopes = new String[] {Scopes.FILE};
if (settings.getBoolean(DbCleanerConstants.PROPERTY_CLEAN_DIRECTORY)) {
scopes = new String[] {Scopes.DIRECTORY, Scopes.FILE};