Prevent to modify the System environment
A source code analyzer
Brought to you by:
adangel,
juansotuyo
The CPDConfiguration modify the System environment "file.encoding", and may cause the code using CPD's API unpredictable behavior. It's better to prevent using platform default encoding, but using a encoding parameter explicitly.
Backlink: http://jira.codehaus.org/browse/MPMD-193
Diff:
This will be fixed with the next version 5.2.2
See commit https://github.com/pmd/pmd/commit/afc13b29a20036ffbdabc13753e952807be7e91e
Either setEncoding or setSourceEncoding needs to be called.