Closed GoogleCodeExporter closed 9 years ago
Just to clarify: this breaks if Iterables.toArray is passed a *collection*
which is modified concurrently?
Original comment by wasserman.louis
on 19 Oct 2013 at 4:40
Yes, in case of a non-collection it runs through
`Lists.newArrayList(iterable.iterator())` which by taking a snapshot prevents
the problem.
Albeit rather inefficient (everything gets copied into the ArrayList's array
and then out again), it works fine in this case.
Original comment by Maaarti...@gmail.com
on 19 Oct 2013 at 4:50
My comment regarding the efficiency was wrong, as the ArrayList has typically a
bigger underlying array than size(), so copying is unavoidable.
Original comment by Maaarti...@gmail.com
on 19 Oct 2013 at 6:58
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<issue id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:12
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:17
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
Maaarti...@gmail.com
on 19 Oct 2013 at 4:37Attachments: