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 189399

Summary: Code completion inserts invalid semi-colon
Product: java Reporter: wvreeven <wvreeven>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: CLOSED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: NetBeans project that shows how to reproduce the issue

Description wvreeven 2010-08-11 13:57:49 UTC
Created attachment 101315 [details]
NetBeans project that shows how to reproduce the issue

This little bug is very easy to reproduce. Whenever code completion on a collection is performed, a semi-colon is inserted at the wrong place. Please refer to the attached NetBeans project and follow the instructions (which are also put in the Java code):

Insert code above the declaration of "anotherString" by
- typing stringH [ctrl-space] and selecting stringHolder
- typing .g [ctrl-space] and selecting getStrings
- typing . [ctrl-space] and selecting add(String e)
The result will be that a semi-colon is inserted in the declaration of anotherString like this

String; anotherString = "Another Code Completion Demo";

The first semi-colon (right behind the first word in the line, String) is inserted when "add" is selected. I get this issue constantly when I refer to collection members like this, which is a LOT :-)
Comment 1 Jan Lahoda 2010-08-16 12:33:10 UTC
Duplicate of bug #177657, thanks for the report anyway.

*** This bug has been marked as a duplicate of bug 177657 ***
Comment 2 wvreeven 2010-08-16 12:42:11 UTC
Thanks, I couldn't find the existing bug using the query tool.