logo       

[ checkstyle-Bugs-1755944 ] @throws tag checking - unexpected error: msg#00245

Subject: [ checkstyle-Bugs-1755944 ] @throws tag checking - unexpected error
Bugs item #1755944, was opened at 2007-07-18 08:19
Message generated for change (Settings changed) made by waysider
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=1755944&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Other
Group:  release 4.3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: waysider (waysider)
>Assigned to: Nobody/Anonymous (nobody)
Summary: @throws tag checking - unexpected error

Initial Comment:
Grateful for any help on this :-)

Trying to resolve a problem with Checkstyle where, if a method's javadoc 
declares a method to be thrown and treewalker cannot load
info for the Exception class it performs no further analysis on the class (as 
documented). So added what I believe to be the correct options to the 
appropriate Checkstyle rules (i.e 'logLoadErrors' and 'suppressLoadErrors') but 
now I get a different error.

The following Java code (a very simple maven plugin) :-

    /**
     * Execute method (entry point).
     * @throws MojoFailureException if an error occurs
     * @throws MojoExecutionException if an error occurs
     */
    public void execute()
        throws MojoFailureException, MojoExecutionException

Produces no violations in the Eclipse checkstyle plugin but in Maven checkstyle 
plugin report I get:-

                JavadocMethodCheck          Expected @throws tag for 
'MojoExecutionException'. 
                RedundantThrowsCheck    Redundant throws: 
'MojoExecutionException' listed more then one time. 

The relevant checkstyle config entries (same in both environments) are:-

<module name="JavadocMethod">
        <property name="severity" value="error"/>
        <property name="logLoadErrors" value="true"/>
        <property name="suppressLoadErrors" value="true"/>
</module>

<module name="RedundantThrows">
         <property name="logLoadErrors" value="true"/>
         <property name="suppressLoadErrors" value="true"/>
</module>

I have tried various combinations of the above without success. Can anyone shed 
any light on why Checkstyle says it wants a @throws tag when its got one ?

TIA

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=1755944&group_id=29721

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


<Prev in Thread] Current Thread [Next in Thread>