Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 142225

Summary: Code completion and fixing imports works strange with generics
Product: java Reporter: dlipin <dlipin>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: rcasha
Version: 6.x   
Target Milestone: 6.x   
Hardware: All   
OS: Windows XP   
Whiteboard:
Issue Type: DEFECT Exception Report:
Bug Depends on:    
Bug Blocks: 152194    

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
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo