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

Summary: Do not suggest making a final (no-op) method abstract
Product: editor Reporter: bugmenot1
Component: Hints & AnnotationsAssignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

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.)