summaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/main
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-11-10 17:29:52 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-11-12 11:01:30 +0100
commitc20343073c1c3ba5356db69a9c1a040cab339fa1 (patch)
tree6004d5f70eac2c329ace178a2197dec29f190a89 /sonar-batch/src/main
parentdd16b88717a81272e50624bd60ece463fae8ec76 (diff)
downloadsonarqube-c20343073c1c3ba5356db69a9c1a040cab339fa1.tar.gz
sonarqube-c20343073c1c3ba5356db69a9c1a040cab339fa1.zip
SONAR-6993 Replace hash of CpdTextBlock from a list of int to a string
Having a the hash represented as a list of int in the report brings too much complexity in the compute engine, as we need only a string.
Diffstat (limited to 'sonar-batch/src/main')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/cpd/index/SonarDuplicationsIndex.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/cpd/index/SonarDuplicationsIndex.java b/sonar-batch/src/main/java/org/sonar/batch/cpd/index/SonarDuplicationsIndex.java
index ca331ebeb2c..f5872efdd50 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/cpd/index/SonarDuplicationsIndex.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/cpd/index/SonarDuplicationsIndex.java
@@ -60,9 +60,7 @@ public class SonarDuplicationsIndex extends AbstractCloneIndex {
builder.setEndLine(input.getEndLine());
builder.setStartTokenIndex(input.getStartUnit());
builder.setEndTokenIndex(input.getEndUnit());
- for (int i : input.getBlockHash().toIntArray()) {
- builder.addHash(i);
- }
+ builder.setHash(input.getBlockHash().toHexString());
return builder.build();
}
}));