You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sean Bridges (JIRA)" <ji...@codehaus.org> on 2007/11/15 23:23:25 UTC

[jira] Created: (MPMD-64) verbose output not useful for inner classes

verbose output not useful for inner classes
-------------------------------------------

                 Key: MPMD-64
                 URL: http://jira.codehaus.org/browse/MPMD-64
             Project: Maven 2.x PMD Plugin
          Issue Type: Improvement
          Components: PMD
    Affects Versions: 2.2
            Reporter: Sean Bridges
            Priority: Minor


With verbose output on, a pmd error in an inner class will produce output like,

[INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.

Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Updated: (MPMD-64) verbose output not useful for inner classes

Posted by "Xavier Le Vourch (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xavier Le Vourch updated MPMD-64:
---------------------------------

    Attachment: version_update.txt

> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>         Attachments: version_update.txt
>
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Updated: (MPMD-64) verbose output not useful for inner classes

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MPMD-64:
----------------------------------

    Fix Version/s: 2.4

> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: version_update.txt
>
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Closed: (MPMD-64) verbose output not useful for inner classes

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MPMD-64.
---------------------------------

      Assignee: Benjamin Bentmann
    Resolution: Fixed

With PMD 4.2.1, I observe the following output
{noformat}
[INFO] [pmd:check {execution: default}]
[INFO] PMD Failure: org.Main$LocalClass:10 ...
[INFO] PMD Failure: org.Main:15 ...
[INFO] PMD Failure: org.Main$InnerClass:22 ...
{noformat}
i.e. the top-level class and the line number are properly given, so thanks to Xavier for his work over on PMD!

> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: version_update.txt
>
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Commented: (MPMD-64) verbose output not useful for inner classes

Posted by "Xavier Le Vourch (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_115628 ] 

Xavier Le Vourch commented on MPMD-64:
--------------------------------------

I created a bug report for pmd at:

http://sourceforge.net/tracker/index.php?func=detail&aid=1842505&group_id=56262&atid=479921

so that the fix can be tracked here.


> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Issue Comment Edited: (MPMD-64) verbose output not useful for inner classes

Posted by "Xavier Le Vourch (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=128772#action_128772 ] 

xlv edited comment on MPMD-64 at 3/26/08 1:26 PM:
---------------------------------------------------------------

The just released pmd 4.2 fixes this problem as the inner classes names are not correctly generated in the xml reports.

Updating the pmd-jdk14 version required in pom.xml to 4.2 is all that's needed...

Xavier


      was (Author: xlv):
    The just released pmd 4.2 fixes this problem as the inner classes names are not correctly generated in the xml reports.

Updating the pmd-jdk14 version required in pom.xml to 4.2 is all that's needed...

Xavier

Index: pom.xml
===================================================================
--- pom.xml     (revision 641455)
+++ pom.xml     (working copy)
@@ -156,7 +156,7 @@
     <dependency>
       <groupId>pmd</groupId>
       <artifactId>pmd-jdk14</artifactId>
-      <version>4.1.1</version>
+      <version>4.2</version>
     </dependency>
     <!-- test -->
     <dependency>

  
> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>         Attachments: version_update.txt
>
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Commented: (MPMD-64) verbose output not useful for inner classes

Posted by "Xavier Le Vourch (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=128772#action_128772 ] 

Xavier Le Vourch commented on MPMD-64:
--------------------------------------

The just released pmd 4.2 fixes this problem as the inner classes names are not correctly generated in the xml reports.

Updating the pmd-jdk14 version required in pom.xml to 4.2 is all that's needed...

Xavier

Index: pom.xml
===================================================================
--- pom.xml     (revision 641455)
+++ pom.xml     (working copy)
@@ -156,7 +156,7 @@
     <dependency>
       <groupId>pmd</groupId>
       <artifactId>pmd-jdk14</artifactId>
-      <version>4.1.1</version>
+      <version>4.2</version>
     </dependency>
     <!-- test -->
     <dependency>


> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Commented: (MPMD-64) verbose output not useful for inner classes

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=131390#action_131390 ] 

Benjamin Bentmann commented on MPMD-64:
---------------------------------------

OK, the new snapshot is up (2.4-20080419.112201-2).

> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>         Attachments: version_update.txt
>
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Commented: (MPMD-64) verbose output not useful for inner classes

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=131349#action_131349 ] 

Benjamin Bentmann commented on MPMD-64:
---------------------------------------

I've updated the plugin's dependency on PMD to 4.2.1 (MPMD-78), so this should be fixed. Unfortunately, I can't deploy a new snapshot for users to test right now due to permission problems.

> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>         Attachments: version_update.txt
>
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

-- 
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] Commented: (MPMD-64) verbose output not useful for inner classes

Posted by "Xavier Le Vourch (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_115444 ] 

Xavier Le Vourch commented on MPMD-64:
--------------------------------------

This is really an issue with the xml format in pmd. It's not giving the correct info for inner classes, whether they're anonymous or not as the enclosing class name is not part of the report. I'll fix it in pmd itself.




> verbose output not useful for inner classes
> -------------------------------------------
>
>                 Key: MPMD-64
>                 URL: http://jira.codehaus.org/browse/MPMD-64
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.2
>            Reporter: Sean Bridges
>            Priority: Minor
>
> With verbose output on, a pmd error in an inner class will produce output like,
> [INFO] PMD Failure: foo.bar.Anonymous$1:182 Rule:SignatureDeclareThrowsException Priority:3 A method/constructor shouldn't explicitly throw java.lang.Exception.
> Rather than printing the class name, it would be more useful to print out the file name.

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