diff options
author | Eric Hartmann <hartmann.eric@gmail.com> | 2012-03-05 11:54:14 +0100 |
---|---|---|
committer | Eric Hartmann <hartmann.eric@gmail.com> | 2012-03-05 11:54:14 +0100 |
commit | 7c6222ae03569c5af98fdbe646edde3f52cd1674 (patch) | |
tree | 55ad97286c5c412ac2f9c2ea789e8387637a0dc3 /sonar-duplications | |
parent | 55def5196301144549383879c9e3e3752573155c (diff) | |
parent | 449823bb51378c333f4028d1ff015d5c50e973d9 (diff) | |
download | sonarqube-7c6222ae03569c5af98fdbe646edde3f52cd1674.tar.gz sonarqube-7c6222ae03569c5af98fdbe646edde3f52cd1674.zip |
Merge branch 'release-2.14'
Diffstat (limited to 'sonar-duplications')
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 |