diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-03-17 16:43:27 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-03-18 09:22:45 +0100 |
commit | a17301de1b5050815a9219003f138330ffc707bb (patch) | |
tree | a79d66df94b38c8af35b23a0c12b7fd01b6f3f7f /sonar-batch/src | |
parent | e67fec2e7356cd8ae99ccc318e7d65f25839ba61 (diff) | |
download | sonarqube-a17301de1b5050815a9219003f138330ffc707bb.tar.gz sonarqube-a17301de1b5050815a9219003f138330ffc707bb.zip |
Batch should set updated date to 0 on updated sources and Compute should update this sources for current project
Diffstat (limited to 'sonar-batch/src')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java index dd084a834c2..e27d9eca168 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java @@ -102,7 +102,7 @@ public class SourcePersister implements ScanPersister { .setSrcHash(metadata.hash()) .setLineHashes(lineHashesAsMd5Hex(inputFile)) .setCreatedAt(system2.now()) - .setUpdatedAt(system2.now()); + .setUpdatedAt(0L); mapper.insert(dto); session.commit(); } else { @@ -115,7 +115,7 @@ public class SourcePersister implements ScanPersister { .setLineHashes(lineHashesAsMd5Hex(inputFile)); // Optimization do not change updated at when updating src_hash to avoid indexation by E/S if (!dataHash.equals(previousDto.getDataHash())) { - previousDto.setUpdatedAt(system2.now()); + previousDto.setUpdatedAt(0L); } mapper.update(previousDto); session.commit(); |