Merge pull request #27 from uncletall/pmd/5.0.x

cpd: fix #1144 CPD encoding argument has no effect
This commit is contained in:
Pelisse Romain
2013-10-29 09:35:17 -07:00

View File

@ -23,14 +23,14 @@ public class CPDConfiguration extends AbstractConfiguration {
String languageString = findOptionalStringValue(args, "--language", "java"); String languageString = findOptionalStringValue(args, "--language", "java");
language = new LanguageFactory().createLanguage(languageString); language = new LanguageFactory().createLanguage(languageString);
String formatString = findOptionalStringValue(args, "--format", "text");
renderer = getRendererFromString(formatString);
final String systemDefaultEncoding = System.getProperty("file.encoding"); final String systemDefaultEncoding = System.getProperty("file.encoding");
setEncoding( findOptionalStringValue(args, "--encoding", systemDefaultEncoding) ); setEncoding( findOptionalStringValue(args, "--encoding", systemDefaultEncoding) );
String formatString = findOptionalStringValue(args, "--format", "text");
renderer = getRendererFromString(formatString);
minimumTileSize = Integer.parseInt(findRequiredStringValue(args, "--minimum-tokens")); minimumTileSize = Integer.parseInt(findRequiredStringValue(args, "--minimum-tokens"));
skipDuplicates = findBooleanSwitch(args, "--skip-duplicate-files"); skipDuplicates = findBooleanSwitch(args, "--skip-duplicate-files");
} }