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 201095 - [70cat] java.util.NoSuchElementException at java.util.LinkedList$ListItr.previous
Summary: [70cat] java.util.NoSuchElementException at java.util.LinkedList$ListItr.prev...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-18 12:01 UTC by misterm
Modified: 2011-10-19 14:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180701


Attachments
stacktrace (4.45 KB, text/plain)
2011-08-18 12:01 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2011-08-18 12:01:50 UTC
Build: NetBeans IDE Dev (Build 20110815-46e7ed429e28)
VM: Java HotSpot(TM) Client VM, 16.2-b04, Java(TM) SE Runtime Environment, 1.6.0_19-b04
OS: Windows 7

Stacktrace: 
java.util.NoSuchElementException
   at java.util.LinkedList$ListItr.previous(LinkedList.java:712)
   at java.util.Collections$UnmodifiableList$1.previous(Collections.java:1178)
   at org.netbeans.modules.java.source.queriesimpl.JavaOperationsImpl.getMethodSpan(JavaOperationsImpl.java:233)
   at org.netbeans.modules.java.source.queries.api.Queries.getMethodSpan(Queries.java:205)
   at org.netbeans.modules.form.FormJavaSource$8.apply(FormJavaSource.java:248)
   at org.netbeans.modules.form.FormJavaSource$8.apply(FormJavaSource.java:245)
Comment 1 misterm 2011-08-18 12:01:54 UTC
Created attachment 110083 [details]
stacktrace
Comment 2 Jan Stola 2011-08-29 12:19:35 UTC
The exception is thrown by

List<Comment> cmts = ...
end = cmts.listIterator().previous().pos();

in JavaOperationsImpl. There is no surprise it throws NoSuchElementException. There is no element preceding the first element => reassigning to java/Source.
Comment 3 Tomas Zezula 2011-10-18 16:30:33 UTC
Fixed jet-main 0c3cb059d93b
Comment 4 Quality Engineering 2011-10-19 14:13:39 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/0c3cb059d93b
User: Tomas Zezula <tzezula@netbeans.org>
Log: #201095:[70cat] java.util.NoSuchElementException at java.util.LinkedList$ListItr.previous