# Damnandbuggerit
If you have a large view, and are traversing a ViewEntryCollection, the 16128th entry will duplicate, so that entry 16129 is actually the 16128th entry *again*. After that things are off by one, and you'll never actually hit the last entry in the view. This 'off-by-one' error re-occurs for every multiple of 16128, so your 32257th entry will also be wrong, etc.
This is a commonly-known LotusScript bug, but I just found out the hard way that Java is susceptible to this too. Pffeh!
Update: it seems that ViewNavigator isn't plagued by these problems. So that looks like it's a workaround. The only problem with ViewNavigator is that you run into memory leak issues if you don't explicitly recycle() the underlying document. I returned the Document from a class method that encapsulated the ViewNavigator and ViewEntry (I'm a big fan of writing my own iterators), and despite explicitly recycling that, I still had to add
to the code to swat that document. That doesn't make sense, but at 3h30 in the morning, I'm not going to complain. Thank heavens for notes.net!
File under: notes/domino : {2004.01.21 02:24}