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 - AssertionError: dotPos=1422 != insertionOffset=1421
Summary: AssertionError: dotPos=1422 != insertionOffset=1421
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: David Strupl
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2010-08-31 01:48 UTC by David Konecny
Modified: 2010-10-26 09:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 172245


Attachments
stacktrace (2.54 KB, text/plain)
2010-08-31 01:48 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
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