[ 
https://jira.codehaus.org/browse/MPMD-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=356814#comment-356814
 ] 

Tweea Tang edited comment on MPMD-193 at 11/24/14 9:52 AM:
-----------------------------------------------------------

Yes, PMD 5.1.1 use the sourceEncoding property to read the source file.
PMD 5.0.5's CPDConfiguration.setEncoding() set the sourceEncoding property 
directly. PMD 5.1.1's CPDConfiguration.setEncoding() changed to set the new 
encoding property which is not used directly.
I was test the patch on my source code with Chinese characters, and it works.


was (Author: tweea):
Yes, PMD 5.1.1 use the sourceEncoding property to read the source file.
PMD 5.0.5's CPDConfiguration.setEncoding() set the sourceEncoding property 
directly. PMD 5.1.1's CPDConfiguration.setEncoding() changed to set the new 
encoding property which is not used directly.

> CPD's sourceEncoding not set since PMD 5.1.1 is used
> ----------------------------------------------------
>
>                 Key: MPMD-193
>                 URL: https://jira.codehaus.org/browse/MPMD-193
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: CPD
>    Affects Versions: 3.2, 3.3, 3.4
>            Reporter: Tweea Tang
>         Attachments: CpdReport.java.patch, 
> CpdReport.java(setSourceEncoding).patch
>
>
> Since PMD 5.1.1, CPDConfiguration adds a method postContruct().
> This method is used to set the sourceEncoding property used to read source 
> files in PMD.
> If the sourceEncoding not set, CPD will use the platform default encoding to 
> read the source files and maven-pmd-plugin's encoding has no effects.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to