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 - [65cat] Implementing an abstract method adds duplicate import statements
Summary: [65cat] Implementing an abstract method adds duplicate import statements
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
Depends on:
Blocks: 152192
  Show dependency tree
Reported: 2008-10-03 12:57 UTC by rajivderas
Modified: 2012-04-24 12:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Test project. (9.54 KB, application/x-compressed)
2008-10-03 14:38 UTC, Jan Lahoda

Note You need to log in before you can comment on or make changes to this bug.
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.