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 149056

Summary: [65cat] Implementing an abstract method adds duplicate import statements
Product: java Reporter: rajivderas <rajivderas>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 152192    
Attachments: Test project.

Description rajivderas 2008-10-03 12:57:05 UTC
Steps to reproduces:
1) Create a java interface with two methods and pass a class object as parameter
2) In a java class implement the interface in step 1
3) The editor info tip asks to implement all abstract metods just clik it
4) It create the implementation methods BUT it imports multiple(duplicates) copies of import statement of the class 
object used as a parameter
Comment 1 rajivderas 2008-10-03 13:14:11 UTC
This happens when the package that contains the class object that is passed as the parameter in the interface method is 
not api version (This happened to me in a net beans module project)
Comment 2 rajivderas 2008-10-03 13:16:59 UTC
Product Version: NetBeans IDE Dev (Build 200810011401)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\Rajiv Perera\.netbeans\dev
Comment 3 Jan Lahoda 2008-10-03 14:36:33 UTC
Can happen if the parameter's class is not resolvable. I am going to attach example project. To reproduce, unpack, open
c.Main and accept the fix.
Comment 4 Jan Lahoda 2008-10-03 14:38:06 UTC
Created attachment 71117 [details]
Test project.
Comment 5 Dusan Balek 2012-04-24 12:43:15 UTC
Should be fixed in current dev build.