This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 181723 - [69cat] Protected member in final class hint doesn't take overriding in account
Summary: [69cat] Protected member in final class hint doesn't take overriding in account
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 14:33 UTC by misterm
Modified: 2010-03-20 06:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2010-03-09 14:33:30 UTC
The new hint in Class Structure -> Protected member in final class' description is:

Reports any instances of members being declared protected in classes that are declared final. Such members may be declared private or package-visible instead.

However, this reasoning is broken if we are talking about an overridden method that is declared protected in the superclass. In the final subclass, you can either keep it protected or make it public.

Therefore, the hint is useless for these scenarios and shouldn't been shown for them.
Comment 1 Jan Lahoda 2010-03-19 11:35:49 UTC
Fixed:
http://hg.netbeans.org/jet-main/rev/ffdf00cd0f4e
Comment 2 Quality Engineering 2010-03-20 06:28:48 UTC
Integrated into 'main-golden', will be available in build *201003200200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ffdf00cd0f4e
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #181723: protected methods overriding protected methods inside final class are OK.