cpd: fix #1144 CPD encoding argument has no effect
Make sure the encoding is set before creating the renderer
This commit is contained in:
parent
c9da879840
commit
33413371f6
@ -23,14 +23,14 @@ public class CPDConfiguration extends AbstractConfiguration {
|
||||
String languageString = findOptionalStringValue(args, "--language", "java");
|
||||
language = new LanguageFactory().createLanguage(languageString);
|
||||
|
||||
String formatString = findOptionalStringValue(args, "--format", "text");
|
||||
renderer = getRendererFromString(formatString);
|
||||
|
||||
final String systemDefaultEncoding = System.getProperty("file.encoding");
|
||||
setEncoding( findOptionalStringValue(args, "--encoding", systemDefaultEncoding) );
|
||||
|
||||
String formatString = findOptionalStringValue(args, "--format", "text");
|
||||
renderer = getRendererFromString(formatString);
|
||||
|
||||
minimumTileSize = Integer.parseInt(findRequiredStringValue(args, "--minimum-tokens"));
|
||||
|
||||
|
||||
skipDuplicates = findBooleanSwitch(args, "--skip-duplicate-files");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user