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

Eric Barboni edited comment on MPMD-134 at 12/14/11 8:55 AM:
-------------------------------------------------------------

Hi Dennis,

The previous file remove the fail in junit for default configuration.


There is a failing test remaining in CpdReportTest line 132-133:

  str = readFile( new File( getBasedir(), 
"target/test/unit/custom-configuration/target/site/cpd.html" ) );
  assertTrue( str.toLowerCase().indexOf( "private String unusedMethod( String 
unusedParam )".toLowerCase() ) != -1 );

I do some testing
 with default pmd 4.2.5 UI report contains "private String unusedMethod( String 
unusedParam )"
 with default pmd 4.3 UI report contains "private String unusedMethod()"

As this configuration is based on a 25 minimumTokens check I would change the 
assertion by
assertTrue( str.toLowerCase().indexOf( "private String 
unusedMethod(".toLowerCase() ) != -1 );

because we are not checking the duplication of parameter is "out of bounds"






                
      was (Author: skygolanur):
    Hi Dennis,

The previous file remove the fail in junit for default configuration.


There is a failing test remaining in CpdReportTest line 132-133:

  {{str = readFile( new File( getBasedir(), 
"target/test/unit/custom-configuration/target/site/cpd.html" ) );
  assertTrue( str.toLowerCase().indexOf( "private String unusedMethod( String 
unusedParam )".toLowerCase() ) != -1 );}}

I do some testing
 with default pmd 4.2.5 UI report contains * "private String unusedMethod( 
String unusedParam )" *
 with default pmd 4.3 UI report contains * "private String unusedMethod()" *




                  
> Update to PMD 4.3 -- allow target to java 7
> -------------------------------------------
>
>                 Key: MPMD-134
>                 URL: https://jira.codehaus.org/browse/MPMD-134
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Wish
>          Components: PMD
>            Reporter: Eric Barboni
>         Attachments: CpdReportGenerator.java
>
>
> After patching some source file with new Java 7 diamond operator (i.e. new 
> HashMap<>()) all  reports on this files are broken due to parsing error.
> It would be nice to patch the next 2.7 plug-in with 4.3 PMD to support all 
> Java version grammar.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to