aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications
diff options
context:
space:
mode:
authorEric Hartmann <hartmann.eric@gmail.com>2012-03-05 11:54:14 +0100
committerEric Hartmann <hartmann.eric@gmail.com>2012-03-05 11:54:14 +0100
commit7c6222ae03569c5af98fdbe646edde3f52cd1674 (patch)
tree55ad97286c5c412ac2f9c2ea789e8387637a0dc3 /sonar-duplications
parent55def5196301144549383879c9e3e3752573155c (diff)
parent449823bb51378c333f4028d1ff015d5c50e973d9 (diff)
downloadsonarqube-7c6222ae03569c5af98fdbe646edde3f52cd1674.tar.gz
sonarqube-7c6222ae03569c5af98fdbe646edde3f52cd1674.zip
Merge branch 'release-2.14'
Diffstat (limited to 'sonar-duplications')
-rw-r--r--sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java6
-rw-r--r--sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java2
-rw-r--r--sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java2
3 files changed, 4 insertions, 6 deletions
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java b/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java
index 57e84688d76..7881ee60cfd 100644
--- a/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java
+++ b/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java
@@ -37,16 +37,14 @@ import java.util.List;
*/
public class TokenizerBridge {
- private static final int BLOCK_SIZE = 10;
-
private final Tokenizer tokenizer;
private final String encoding;
private final PmdBlockChunker blockBuilder;
- public TokenizerBridge(Tokenizer tokenizer, String encoding) {
+ public TokenizerBridge(Tokenizer tokenizer, String encoding, int blockSize) {
this.tokenizer = tokenizer;
this.encoding = encoding;
- this.blockBuilder = new PmdBlockChunker(BLOCK_SIZE);
+ this.blockBuilder = new PmdBlockChunker(blockSize);
}
// TODO remove from here
diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java
index 60c22a51f85..54210b9c237 100644
--- a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java
+++ b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java
@@ -44,7 +44,7 @@ public class PmdBridgeTest {
@Before
public void setUp() {
index = new PackedMemoryCloneIndex();
- bridge = new TokenizerBridge(new JavaTokenizer(), "UTF-8");
+ bridge = new TokenizerBridge(new JavaTokenizer(), "UTF-8", 10);
}
@Test
diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java
index ec2bd5d0d9b..41a78275377 100644
--- a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java
+++ b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java
@@ -49,7 +49,7 @@ public class TokenizerBridgeTest {
tokenEntries.add(TokenEntry.getEOF());
}
};
- bridge = new TokenizerBridge(tokenizer, "UTF-8");
+ bridge = new TokenizerBridge(tokenizer, "UTF-8", 10);
}
@Test