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 - Java completion places semicolon incorrectly
Summary: Java completion places semicolon incorrectly
Status: RESOLVED DUPLICATE of bug 177657
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-19 09:10 UTC by Jan Pokorsky
Modified: 2010-09-29 15:08 UTC (History)
0 users

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 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 ***