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 110956 - AssertionError after deleting extra parenthesis or reformat
Summary: AssertionError after deleting extra parenthesis or reformat
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 110955 110970 111026 111068 111170 111203 111307 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-25 15:18 UTC by novakm
Modified: 2012-09-13 08:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 17


Attachments
Exception Stacktrace (2.84 KB, text/plain)
2007-07-25 15:20 UTC, novakm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description novakm 2007-07-25 15:18:33 UTC
I had some code with one extra closing parenthesis and when I deleted it, following AE was thrown:

java.lang.AssertionError
	at org.netbeans.modules.editor.hints.AnnotationHolder$PositionComparator.compare(AnnotationHolder.java:909)
	at java.util.Collections.indexedBinarySearch(Collections.java:319)
        ...

It repeated also when I tried to reformat code. However, when I tried to reproduce, I didn't succeed. Maybe you will
find the cause in attached stacktrace.
----
Product Version: NetBeans IDE Dev (Build 200707250000
Comment 1 novakm 2007-07-25 15:20:18 UTC
*** Issue 110955 has been marked as a duplicate of this issue. ***
Comment 2 novakm 2007-07-25 15:20:55 UTC
Created attachment 45677 [details]
Exception Stacktrace
Comment 3 Jiri Prox 2007-07-26 10:04:29 UTC
*** Issue 111026 has been marked as a duplicate of this issue. ***
Comment 4 Jiri Prox 2007-07-26 10:07:42 UTC
Steps to reproduce:
1) turn on all braces hint
2) create class:
public class Test {
    public Test() {
        if(true) System.out.println("d");
    }  
}

-> there is hint suggesting adding braces to if()
3) select whole body of class - e.g all between first { and last }
4) press delete
Comment 5 Jan Lahoda 2007-07-26 10:24:40 UTC
*** Issue 111068 has been marked as a duplicate of this issue. ***
Comment 6 Jan Lahoda 2007-07-26 11:58:05 UTC
Should be fixed:
Checking in AnnotationHolder.java;
/cvs/editor/hints/src/org/netbeans/modules/editor/hints/AnnotationHolder.java,v  <--  AnnotationHolder.java
new revision: 1.18; previous revision: 1.17
done
Comment 7 Torbjorn Norbye 2007-07-26 15:05:37 UTC
*** Issue 110970 has been marked as a duplicate of this issue. ***
Comment 8 Jan Lahoda 2007-07-26 20:26:26 UTC
*** Issue 111170 has been marked as a duplicate of this issue. ***
Comment 9 novakm 2007-07-27 11:30:20 UTC
Verified in Build 200707250000
Comment 10 Jiri Prox 2007-07-30 09:56:21 UTC
*** Issue 111307 has been marked as a duplicate of this issue. ***
Comment 11 Jan Lahoda 2007-07-31 13:33:35 UTC
*** Issue 111203 has been marked as a duplicate of this issue. ***