Hi
JavaDoc to the method says: "If the sequence is mutated while the stream
is being read, the result is undefined."
What about exceptions? If the sequence is mutated and length becomes
smaller you'll get IndexOutOfBoundsException in forEachRemaining method.
On 06/04/2013 12:33 AM, Henry Jen wrote:
Hi,
Please review
http://cr.openjdk.java.net/~henryjen/tl/8015522.0/webrev/
This webrev is based on previous suggestion from Martin Buchholz while
keep the lazy-binding nature without seize the length at construction time.
The benchmark shows ~50% performance increase, mainly from reduce of
operation, for example, inline block.accept instead of store the
character to a local var also helps.
Cheers,
Henry
--
Best regards,
Sergey Kuksenko