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 248597 - Do not suggest making a final (no-op) method abstract
Summary: Do not suggest making a final (no-op) method abstract
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 13:18 UTC by bugmenot1
Modified: 2014-11-12 13:18 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugmenot1 2014-11-12 13:18:39 UTC
I have enabled the Java hint “Class Structure” → “No-op method in abstract class” and a class like this:

abstract class DocumentContentListener implements DocumentListener {

    @Override
    public final void changedUpdate(final DocumentEvent ignored) {
        // ignore
    }
}

I get a hint suggesting the no-op method should be made abstract. As the “final” modifier shows, the intention is to prevent subclasses to override this method. Therefore, the hint should not be displayed when the “final” modifier is present.

I reproduced this in 8.0.1 and Nightly (Build 201411120002 – without updates. After installing updates, I couldn’t open the file anymore, getting various exceptions in NetBeans.)