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 142225 - Code completion and fixing imports works strange with generics
Summary: Code completion and fixing imports works strange with generics
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 158436 195695 (view as bug list)
Depends on:
Blocks: 152194
  Show dependency tree
 
Reported: 2008-07-30 14:00 UTC by dlipin
Modified: 2012-10-16 13:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dlipin 2008-07-30 14:00:24 UTC
Steps to reproduce:
1) Create Java Application, main class is opened in the editor at the end of project creation
2) Type inside the main class main() method:
List <String> list = new ArrayList <String> ();
3) Move pointer to the end of "List" and press ctrl-space, choose "List <E> (java.util)"
4) The result is that java.util.List is imported that is correct (import is listed twice, but another issue was filed 
on that, maybe already fixed).
5) Move pointer to the end of "ArrayList", press ctrl-space, choose "ArrayList <String> (java.util).
6) The ArrayList is imported but the string becomes wrong:
List <String> list = new ArrayList<String><String> ();

This is quite annoying.
It occurs with the latest dev build (200807300201) and with 6.1 as well.
Comment 1 Jan Lahoda 2008-07-30 14:18:13 UTC
Most likely the same root cause as issue #142199.

*** This issue has been marked as a duplicate of 142199 ***
Comment 2 dlipin 2008-07-30 14:54:13 UTC
Sorry to say that but unfortunately it is not.
The behaviour mentioned in #142199 is reproduced only in recent 6.5dev builds while this issue is reproducible even in 
6.1.

I`ve checked trunk build 200807301401 (which contains the fix) - the issue is still reproducible there.
Comment 3 dlipin 2008-09-18 16:27:17 UTC
btw, is it still on track to fixing this issue in 6.5?
Comment 4 dlipin 2008-09-18 16:33:32 UTC
btw, is it still on track to fixing this issue in 6.5?
Comment 5 Dusan Balek 2009-02-12 13:02:18 UTC
*** Issue 158436 has been marked as a duplicate of this issue. ***
Comment 6 Dusan Balek 2011-02-21 10:59:10 UTC
*** Bug 195695 has been marked as a duplicate of this bug. ***
Comment 7 Dusan Balek 2012-10-16 13:36:46 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/1a1795bc066e