diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2014-11-19 11:15:05 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2014-11-19 11:15:05 +0100 |
commit | 357eb9859039ff00f6cee81f39ab676c58914673 (patch) | |
tree | 6b1df14dd916dd6326d290d7446a4433bafb73af /sonar-core/src | |
parent | b3c6b505577dfd10a397dab6cb467cc4941e3855 (diff) | |
download | sonarqube-357eb9859039ff00f6cee81f39ab676c58914673.tar.gz sonarqube-357eb9859039ff00f6cee81f39ab676c58914673.zip |
SONAR-5628 add medium test
Diffstat (limited to 'sonar-core/src')
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}; |