Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RangeCheck throwing odd exception in ArrayList

807591Mar 13 2008 — edited Mar 14 2008
Hello,

I'm experiencing the strangest exception with an ArrayList. Here's the stack trace (partial):

java.lang.IndexOutOfBoundsException: Index: 0, Size: 18
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at prefuse.data.CascadedTable.getColumn(CascadedTable.java:442)
at prefuse.data.Table.getLong(Table.java:1097)
at prefuse.data.Graph.getSourceNode(Graph.java:887)
at prefuse.data.Graph.getAdjacentNode(Graph.java:929)
at prefuse.data.Graph.getAdjacentNode(Graph.java:953)

Notice the values of "index" and "size" in the message. Here's the source from ArrayList:
private void RangeCheck(int index) {
	if (index >= size)
	    throw new IndexOutOfBoundsException(
		"Index: "+index+", Size: "+size);
    }
Clearly, 0 < 18 (index < size), so, how in the heck am I getting this exception? Any ideas?

Thanks for any thoughts,

Chris
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2008
Added on Mar 13 2008
4 comments
431 views