elharo commented on PR #118:
URL: https://github.com/apache/maven-pmd-plugin/pull/118#issuecomment-1497567669

   Problem is likely in this and similar code in the several violation check 
mojos:
   
   ```
       @Override
       protected List<Duplication> getErrorDetails( File cpdFile )
           throws XmlPullParserException, IOException
       {
           try ( FileReader fileReader = new FileReader( cpdFile ) )
           {
               CpdXpp3Reader reader = new CpdXpp3Reader();
               CpdErrorDetail details = reader.read( fileReader, false );
               return details.getDuplications();
           }
       }
   ```
   
   It passes or fails depending on the system encoding. Instead it should use 
an inputstream rather than a reader and rely on the XML parser to detect the 
encoding.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to