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 195695

Summary: Autocomplete of generic classes adds generic variables even if they already exist
Product: editor Reporter: rcasha <rcasha>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description rcasha 2011-02-19 13:29:29 UTC
If I use Ctrl-space to autocomplete a class name that has generics, the generic tags are added even if they are already there.

for example, when I enter the following text:

private TreeMap<String,String> v = new Tree<String,String>();

..then place the cursor right between Tree and <String,String> and press Ctrl-space, the following will be produced:

private TreeMap<String,String> v = new TreeMap<> <String,String>();

Netbeans is 7.0beta2, running under JDK1.6 with the platform set to JDK1.7.
Comment 1 Dusan Balek 2011-02-21 10:59:10 UTC
Already reported. Thanks.

*** This bug has been marked as a duplicate of bug 142225 ***