Hi all, hasMore: return currentIndex < markup.size(); next: if (++currentIndex < markup.size()) {...} me: while (markupStream.hasMore()) {...}
I get a null element within the while loop which I wouldn't expect to get. markup.size() is 73, currentIndex 72, so hasMore returns true, while next returns null, because it already advanced the index on its check. Is this a bug or is using hasMore the wrong idiom in this case? I just followed code in the core codebase, like in Enclosure, the only difference there is that the result of next is ignored. Of course I can check for null and such, I just didn't expect such a behavior. Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning E-Mail: thorsten.schoen...@am-soft.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...........05151- 9468- 55 Fax...............05151- 9468- 88 Mobil..............0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org