accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z11373 <>
Subject Re: hasNext throws weird exception
Date Thu, 19 Nov 2015 15:15:11 GMT
Hi Josh,
This one seems weird however, and this time is not my mistake with 99%
certainty :-)

When I wrote my code like this:
while (scanner.iterator().hasNext()) { // call scanner.iterator().next()
somewhere }

The hasNext() somehow never got evaluated to true. Then I changed the code

for (Map.Entry<Key, Value> entry : scanner) { // do something with entry var

It works fine. I'd think both should behave same, right?


View this message in context:
Sent from the Developers mailing list archive at

View raw message