|
From: Martin K. <ci...@gm...> - 2003-08-22 21:40:48
|
On Fri, 2003-08-22 at 11:53, Norman Walsh wrote:
> java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.get(ArrayList.java:326)
> at de.cinek.rssview.RssSubscriptionModel.get(RssSubscriptionModel.java:104)
> at de.cinek.rssview.SubscriptionAdapterTreeModel.getChild(SubscriptionAdapterTreeModel.java:71)
I can reproduce it. It appears after opening the "People" node. This
is the tree structure which returns a "not found" for a child node.
I didn't write this part of code. After doing some debugging, I could
locate the piece of code causing the error:
1: if (groupParent.isLeaf(index)) {
2: // Stored id -> lookup in Model and return a real value!
3: Object id = groupParent.getChildAt(index);
4: return model.get(model.indexOf(id));
5: } else {
6: return groupParent.getChildAt(index);
7: }
The id returned in line 3 is valid. I printed out this value
and I could not find it in the whole database. I wonder where
it comes from... And in line 4 model.indexOf() returns -1.
I think indexOf() is not in our sources, but calls another
method from the tree model transparently, so I have some
trouble to find it.
Perhaps something got deleted and it was not released
properly (are foreign keys being used in our database?
It would prevent deletion of parent nodes while children
still exist)?
Perhaps the id is calculated somewhere and it has the wrong
value (the id which causes the error is 2 digits shorter than
the others)?
Perhaps I can find out more later.
Martin
|