Bug 54662 - Bug in Unused Code > ... checked exception > Check overriding
Summary: Bug in Unused Code > ... checked exception > Check overriding
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-12 11:22 EST by Nobody - feel free to take it CLA
Modified: 2004-03-26 05:24 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody - feel free to take it CLA 2004-03-12 11:22:05 EST
Java Compiler > Unused Code > Unnecessary declaration of thrown checked 
exception > Check overriding

The checkbox seems to behave just the wrong way
Comment 1 Philipe Mulet CLA 2004-03-25 06:10:42 EST
Works for me. If the check option is enabled, then overriding/implementing 
methods are checked as well, if not, they are ignored.

Comment 2 Nobody - feel free to take it CLA 2004-03-25 13:07:19 EST
I think, I got the option's sense wrong. But now, another option is missing to 
me. I thought that the 'Check overriding' option would be what I am missing 
now.

Please look at the following two classes ClassA and ClassB:

public class ClassA {
    protected void foo() throws IOException {}
}

public class ClassB extends ClassA {
    protected void foo() throws IOException {
        throw new IOException();
    }
}

foo() in ClassA needs to have the 'throws' clause because foo() in ClassB has 
a 'throws' clause and ClassB extends ClassA.

Thus, the 'throws' clause in ClassA is NOT unnecessary and no warning or error 
should be shown. There could be an option for this - the one I said I was 
missing.
Comment 3 Philipe Mulet CLA 2004-03-26 05:24:05 EST
See bug 44876#c2 for explanation of current behavior.