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 142209

Summary: Code offered by hints is inserted twice
Product: editor Reporter: Petr Dvorak <joshis>
Component: Hints & AnnotationsAssignee: issues@editor <issues>
Status: VERIFIED DUPLICATE    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Petr Dvorak 2008-07-30 12:06:46 UTC
Product Version: NetBeans IDE Dev (Build 200807300201)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)

Code offered by hints (missing Override annotation, missing import, ...) is inserted twice.

To reproduce:

1. Start with code:

package javaapplication2;

public class Main extends ArrayList {

    public static void main(String[] args) {
    }

}

2. Click the light-bulb on the second line and choose to insert an import
-> it is inserted twice

3. Remove the one import and override some ArrayList method
-> Overriden method is inserted twice

4. Remove one duplicate of the method and the @Override annotation by the remaining
5. Use hint to insert override annotation
-> it will be inserted twice
Comment 1 Jan Lahoda 2008-07-30 12:09:22 UTC

*** This issue has been marked as a duplicate of 142199 ***
Comment 2 Petr Dvorak 2008-07-30 12:49:22 UTC
Verified. (I searched for issues under hints&annotations and code completion only.)