accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z11373 <z11...@outlook.com>
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
becomes:

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

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


Thanks,
Z



--
View this message in context: http://apache-accumulo.1065345.n5.nabble.com/hasNext-throws-weird-exception-tp15586p15598.html
Sent from the Developers mailing list archive at Nabble.com.

Mime
View raw message