use of org.sonar.duplications.cpd.FileCodeLoaderWithoutCache in project sonarqube by SonarSource.
the class TokenizerBridge method chunk.
public List<TokensLine> chunk(File file) {
SourceCode sourceCode = new SourceCode(new FileCodeLoaderWithoutCache(file, encoding));
Tokens tokens = new Tokens();
TokenEntry.clearImages();
try {
tokenizer.tokenize(sourceCode, tokens);
} catch (IOException e) {
throw Throwables.propagate(e);
}
TokenEntry.clearImages();
return convert(tokens.getTokens());
}
Aggregations