logo       

Re: New bug identified: Method does not override from superclass?: msg#00022

java.findbugs.general

Subject: Re: New bug identified: Method does not override from superclass?

I meant to mention that - I agree that would be the ideal solution but
part of our product has to support Java 1.4 so we can't make use of
@Override everywhere we'd like.

Rob

Daniel Le Berre wrote:
> Hi Rob,
>
> The @Override tag from Java 5 is especially dedicated to such a task.
>
> The compiler will warn you if a method tagged with @Override does not
> really override a superclass method.
>
> Daniel
>
> Rob Oxspring a écrit :
>> Hi,
>>
>> Sorry if this has cropped up before, I've only just sub'd.
>>
>> I've just discovered a bug in our software that fits what I think is a
>> fairly common pattern. The pattern is that a method signature has been
>> modified in a supertype but the change isn't reflected in a subtype and
>> so when the method is invoked on the subtype, the subtype specific
>> implementation is never used. I ran FindBugs
>> (edu.umd.cs.findbugs.plugin.eclipse_1.1.1.v20061005-rc3.zip) which
>> didn't spot the problem.
>>
>> Could a rule be written to catch a method in a subclass that have the
>> same name as a method in the superclass, but doesn't override that
>> method?
>>
>> Thanks,
>>
>> Rob
>> _______________________________________________
>> Findbugs-discuss mailing list
>> Findbugs-discuss@xxxxxxxxxxxxxxxxxx
>> http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss
>>
>
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise