diff options
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/cpd/index/SonarDuplicationsIndex.java | 4 | ||||
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/mediumtest/cpd/CpdMediumTest.java | 6 |
2 files changed, 4 insertions, 6 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(); } })); diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/cpd/CpdMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/cpd/CpdMediumTest.java index acc0f5255ac..bb41a88d7e6 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/cpd/CpdMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/cpd/CpdMediumTest.java @@ -158,19 +158,19 @@ public class CpdMediumTest { assertThat(duplicationBlocks.get(0).getEndLine()).isEqualTo(5); assertThat(duplicationBlocks.get(0).getStartTokenIndex()).isEqualTo(1); assertThat(duplicationBlocks.get(0).getEndTokenIndex()).isEqualTo(6); - assertThat(duplicationBlocks.get(0).getHashList()).isNotEmpty(); + assertThat(duplicationBlocks.get(0).getHash()).isNotEmpty(); assertThat(duplicationBlocks.get(1).getStartLine()).isEqualTo(2); assertThat(duplicationBlocks.get(1).getEndLine()).isEqualTo(6); assertThat(duplicationBlocks.get(1).getStartTokenIndex()).isEqualTo(3); assertThat(duplicationBlocks.get(1).getEndTokenIndex()).isEqualTo(7); - assertThat(duplicationBlocks.get(0).getHashList()).isNotEmpty(); + assertThat(duplicationBlocks.get(0).getHash()).isNotEmpty(); assertThat(duplicationBlocks.get(2).getStartLine()).isEqualTo(3); assertThat(duplicationBlocks.get(2).getEndLine()).isEqualTo(7); assertThat(duplicationBlocks.get(2).getStartTokenIndex()).isEqualTo(4); assertThat(duplicationBlocks.get(2).getEndTokenIndex()).isEqualTo(8); - assertThat(duplicationBlocks.get(0).getHashList()).isNotEmpty(); + assertThat(duplicationBlocks.get(0).getHash()).isNotEmpty(); } // SONAR-6000 |