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 190442

Summary: Java completion places semicolon incorrectly
Product: editor Reporter: Jan Pokorsky <jpokorsky>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jan Pokorsky 2010-09-19 09:10:21 UTC
Product Version: NetBeans IDE 6.9 (Build 201007282301)
Java: 1.6.0_20; Java HotSpot(TM) Client VM 16.3-b01
System: Linux version 2.6.32-24-generic-pae running on i386; UTF-8; en_US (nb)

Having source:

package pkg;
public class NewClass {
    String foo;
    public NewClass(String s) {
        foo = s.
        String a;
    }
}

When you invoke CC on 's.|', select e.g. 'concat' from the list and commit with <semicolon> then you get broken source like:

    public NewClass(String s) {
        foo = s.concat(s)
        String; a;
             ^^^
    }
Comment 1 Jan Pokorsky 2010-09-19 09:12:48 UTC
ide.log contains

WARNING [org.netbeans.modules.java.source.parsing.JavacParser]: Javac returned startpos: 113 > endpos: -1
Comment 2 Dusan Balek 2010-09-29 15:08:48 UTC
Already reported. Thanks for the report anyway.

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