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 190005

Summary: AssertionError: dotPos=1422 != insertionOffset=1421
Product: editor Reporter: David Konecny <dkonecny>
Component: -- Other --Assignee: David Strupl <dstrupl>
Status: RESOLVED FIXED    
Severity: normal Keywords: REGRESSION
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 172245
Attachments: stacktrace

Description David Konecny 2010-08-31 01:48:23 UTC
Build: NetBeans IDE Dev (Build 100830-ca2c595c9d1e)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Linux

User Comments:
dkonecny: pressed Enter in a source editor




Stacktrace: 
java.lang.AssertionError: dotPos=1422 != insertionOffset=1421
   at org.netbeans.editor.BaseKit$InsertBreakAction.performLineBreakInsertion(BaseKit.java:1356)
   at org.netbeans.editor.BaseKit$InsertBreakAction.access$200(BaseKit.java:1246)
   at org.netbeans.editor.BaseKit$InsertBreakAction$1.run(BaseKit.java:1281)
   at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:344)
   at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:1272)
   at org.netbeans.modules.editor.java.JavaKit$JavaInsertBreakAction.actionPerformed(JavaKit.java:518)
Comment 1 David Konecny 2010-08-31 01:48:27 UTC
Created attachment 101759 [details]
stacktrace
Comment 2 David Konecny 2010-08-31 01:54:47 UTC
Pressing enter in the middle of Java String enclosed in parenthesis in order to split it into two always throws this exception, eg. if | is caret before enter was pressed:

  String s = "do|petrzele";
Comment 3 David Strupl 2010-08-31 11:11:38 UTC
I am having a look right now.
Comment 4 David Strupl 2010-08-31 11:12:58 UTC
100% reproducible --> P1.
Comment 5 David Strupl 2010-08-31 12:47:49 UTC
Fixed in jet-main by
http://hg.netbeans.org/jet-main/rev/831886af1e3d
Comment 6 Dusan Balek 2010-10-26 08:38:15 UTC
Press enter at the position of '|'.

public class Main {]|
Comment 7 Dusan Balek 2010-10-26 09:50:20 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/48799fa057b2