You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robin Vobruba (JIRA)" <ji...@codehaus.org> on 2010/12/02 11:25:03 UTC

[jira] Created: (MPMD-126) PMD fails to parse source code in a specific case

PMD fails to parse source code in a specific case
-------------------------------------------------

                 Key: MPMD-126
                 URL: http://jira.codehaus.org/browse/MPMD-126
             Project: Maven 2.x PMD Plugin
          Issue Type: Bug
          Components: PMD
    Affects Versions: 2.5
         Environment: Gentoo Linux 64bit
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
OS name: "linux" version: "2.6.34-gentoo-r12" arch: "amd64" Family: "unix"
            Reporter: Robin Vobruba
            Priority: Minor
         Attachments: PmdTest.java

i appended a test .java file, which is as minimal as i was able to get it.
when having it in my project, with the pmd plugin defined under reporting, and then using "mvn site",
PMD fails to parse the source code.

Output:
#########
[INFO] Generating "PMD Report" report.
[WARNING] Error while parsing PmdTest.java: Encountered " "(" "( "" at line 99, column 22.
Was expecting one of:
    "." ...
    "." ...
    "." ...
#########
(there are more of these last 3 lines)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPMD-126) PMD fails to parse source code in a specific case

Posted by "Andreas Dangel (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPMD-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314691#comment-314691 ] 

Andreas Dangel commented on MPMD-126:
-------------------------------------

This bug is also fixed with PMD 5.0.1.

In PMD, we verify now, that we can parse such language constructs. See https://github.com/pmd/pmd/blob/pmd_releases/5.0.1/pmd/src/test/resources/net/sourceforge/pmd/ast/ParserCornerCases.java

                
> PMD fails to parse source code in a specific case
> -------------------------------------------------
>
>                 Key: MPMD-126
>                 URL: https://jira.codehaus.org/browse/MPMD-126
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.5
>         Environment: Gentoo Linux 64bit
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_20
> OS name: "linux" version: "2.6.34-gentoo-r12" arch: "amd64" Family: "unix"
>            Reporter: Robin Vobruba
>            Priority: Minor
>         Attachments: PmdTest.java
>
>
> i appended a test .java file, which is as minimal as i was able to get it.
> when having it in my project, with the pmd plugin defined under reporting, and then using "mvn site",
> PMD fails to parse the source code.
> Output:
> #########
> [INFO] Generating "PMD Report" report.
> [WARNING] Error while parsing PmdTest.java: Encountered " "(" "( "" at line 99, column 22.
> Was expecting one of:
>     "." ...
>     "." ...
>     "." ...
> #########
> (there are more of these last 3 lines)

--
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

        

[jira] (MPMD-126) PMD fails to parse source code in a specific case

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MPMD-126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MPMD-126.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 3.0
         Assignee: Olivier Lamy
    
> PMD fails to parse source code in a specific case
> -------------------------------------------------
>
>                 Key: MPMD-126
>                 URL: https://jira.codehaus.org/browse/MPMD-126
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.5
>         Environment: Gentoo Linux 64bit
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_20
> OS name: "linux" version: "2.6.34-gentoo-r12" arch: "amd64" Family: "unix"
>            Reporter: Robin Vobruba
>            Assignee: Olivier Lamy
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: PmdTest.java
>
>
> i appended a test .java file, which is as minimal as i was able to get it.
> when having it in my project, with the pmd plugin defined under reporting, and then using "mvn site",
> PMD fails to parse the source code.
> Output:
> #########
> [INFO] Generating "PMD Report" report.
> [WARNING] Error while parsing PmdTest.java: Encountered " "(" "( "" at line 99, column 22.
> Was expecting one of:
>     "." ...
>     "." ...
>     "." ...
> #########
> (there are more of these last 3 lines)

--
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

        

[jira] (MPMD-126) PMD fails to parse source code in a specific case

Posted by "Aaron Digulla (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPMD-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287404#comment-287404 ] 

Aaron Digulla commented on MPMD-126:
------------------------------------

Does your code contain annotations? Can you post line 99?

If it contains annotations, did you set {{targetJdk}} to 1.5 or 1.6?

Also try version 2.6 of the plugin.
                
> PMD fails to parse source code in a specific case
> -------------------------------------------------
>
>                 Key: MPMD-126
>                 URL: https://jira.codehaus.org/browse/MPMD-126
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.5
>         Environment: Gentoo Linux 64bit
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_20
> OS name: "linux" version: "2.6.34-gentoo-r12" arch: "amd64" Family: "unix"
>            Reporter: Robin Vobruba
>            Priority: Minor
>         Attachments: PmdTest.java
>
>
> i appended a test .java file, which is as minimal as i was able to get it.
> when having it in my project, with the pmd plugin defined under reporting, and then using "mvn site",
> PMD fails to parse the source code.
> Output:
> #########
> [INFO] Generating "PMD Report" report.
> [WARNING] Error while parsing PmdTest.java: Encountered " "(" "( "" at line 99, column 22.
> Was expecting one of:
>     "." ...
>     "." ...
>     "." ...
> #########
> (there are more of these last 3 lines)

--
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

        

[jira] (MPMD-126) PMD fails to parse source code in a specific case

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MPMD-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287446#comment-287446 ] 

Dennis Lundberg commented on MPMD-126:
--------------------------------------

I've verified that this happens using the attached file, using versions 2.6 and 2.7-SNAPSHOT of the plugin.

The sample file does not contain any annotations, but has a really weird syntax. I get the same error, but on line 9, which looks like this:

{code:java}
		super(new Object() {
{code}
                
> PMD fails to parse source code in a specific case
> -------------------------------------------------
>
>                 Key: MPMD-126
>                 URL: https://jira.codehaus.org/browse/MPMD-126
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.5
>         Environment: Gentoo Linux 64bit
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_20
> OS name: "linux" version: "2.6.34-gentoo-r12" arch: "amd64" Family: "unix"
>            Reporter: Robin Vobruba
>            Priority: Minor
>         Attachments: PmdTest.java
>
>
> i appended a test .java file, which is as minimal as i was able to get it.
> when having it in my project, with the pmd plugin defined under reporting, and then using "mvn site",
> PMD fails to parse the source code.
> Output:
> #########
> [INFO] Generating "PMD Report" report.
> [WARNING] Error while parsing PmdTest.java: Encountered " "(" "( "" at line 99, column 22.
> Was expecting one of:
>     "." ...
>     "." ...
>     "." ...
> #########
> (there are more of these last 3 lines)

--
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