Warning: Redundant throws: 'xxxException' is unchecked exception.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning: Redundant throws: 'xxxException' is unchecked exception.

JeffM
Hi there

I'm running Checkstyle from Ant, using checkstyle-all-5.0.jar  and a project specific config file. The check for redundant throws is
specified as :

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

In my code, there are classes that declare a "throws SecurityException" .
SecurityException extends ApplicationException which directly extends java.lang.Exception.

The Checkstyle report is reporting a warning which says :
"Redundant throws: 'SecurityException' is unchecked exception." 

Why is Checkstyle reporting a check exception as being an unchecked one?





------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Warning: Redundant throws: 'xxxException' is unchecked exception.

JeffM
Anyone out there? Is this a bug that needs to be filed?

On Tue, Jul 6, 2010 at 9:48 AM, Jeff Mutonho <[hidden email]> wrote:
Hi there

I'm running Checkstyle from Ant, using checkstyle-all-5.0.jar  and a project specific config file. The check for redundant throws is
specified as :

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

In my code, there are classes that declare a "throws SecurityException" .
SecurityException extends ApplicationException which directly extends java.lang.Exception.

The Checkstyle report is reporting a warning which says :
"Redundant throws: 'SecurityException' is unchecked exception." 

Why is Checkstyle reporting a check exception as being an unchecked one?






------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Warning: Redundant throws: 'xxxException' is unchecked exception.

Oliver Burn
Checkstyle is finding the exception http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/lang/SecurityException.html and not seeing yours.

On Wed, Jul 7, 2010 at 23:39, Jeff Mutonho <[hidden email]> wrote:
Anyone out there? Is this a bug that needs to be filed?


On Tue, Jul 6, 2010 at 9:48 AM, Jeff Mutonho <[hidden email]> wrote:
Hi there

I'm running Checkstyle from Ant, using checkstyle-all-5.0.jar  and a project specific config file. The check for redundant throws is
specified as :

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

In my code, there are classes that declare a "throws SecurityException" .
SecurityException extends ApplicationException which directly extends java.lang.Exception.

The Checkstyle report is reporting a warning which says :
"Redundant throws: 'SecurityException' is unchecked exception." 

Why is Checkstyle reporting a check exception as being an unchecked one?






------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Warning: Redundant throws: 'xxxException' is unchecked exception.

JeffM
So, how do I get around this in order to get a clean report?
Why is Checkstyle seeing the JSDK SecurityException class when I do not even use it in my class?
Is this a bug in Checkstyle?

On Sun, Jul 11, 2010 at 11:57 AM, Oliver Burn <[hidden email]> wrote:
Checkstyle is finding the exception http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/lang/SecurityException.html and not seeing yours.

On Wed, Jul 7, 2010 at 23:39, Jeff Mutonho <[hidden email]> wrote:
Anyone out there? Is this a bug that needs to be filed?


On Tue, Jul 6, 2010 at 9:48 AM, Jeff Mutonho <[hidden email]> wrote:
Hi there

I'm running Checkstyle from Ant, using checkstyle-all-5.0.jar  and a project specific config file. The check for redundant throws is
specified as :

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

In my code, there are classes that declare a "throws SecurityException" .
SecurityException extends ApplicationException which directly extends java.lang.Exception.

The Checkstyle report is reporting a warning which says :
"Redundant throws: 'SecurityException' is unchecked exception." 

Why is Checkstyle reporting a check exception as being an unchecked one?






------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Warning: Redundant throws: 'xxxException' is unchecked exception.

Oliver Burn
Checkstyle is seeing it because it is in the special "java.lang" package which is visible everywhere.

On 12/07/2010 11:31 PM, Jeff Mutonho wrote:
So, how do I get around this in order to get a clean report?
Why is Checkstyle seeing the JSDK SecurityException class when I do not even use it in my class?
Is this a bug in Checkstyle?

On Sun, Jul 11, 2010 at 11:57 AM, Oliver Burn <[hidden email]> wrote:
Checkstyle is finding the exception http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/lang/SecurityException.html and not seeing yours.

On Wed, Jul 7, 2010 at 23:39, Jeff Mutonho <[hidden email]> wrote:
Anyone out there? Is this a bug that needs to be filed?


On Tue, Jul 6, 2010 at 9:48 AM, Jeff Mutonho <[hidden email]> wrote:
Hi there

I'm running Checkstyle from Ant, using checkstyle-all-5.0.jar  and a project specific config file. The check for redundant throws is
specified as :

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

In my code, there are classes that declare a "throws SecurityException" .
SecurityException extends ApplicationException which directly extends java.lang.Exception.

The Checkstyle report is reporting a warning which says :
"Redundant throws: 'SecurityException' is unchecked exception." 

Why is Checkstyle reporting a check exception as being an unchecked one?






------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user


------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ Checkstyle-user mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/checkstyle-user

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user