vigna / fastutil

fastutil extends the Java™ Collections Framework by providing type-specific maps, sets, lists and queues.
Apache License 2.0
1.76k stars 196 forks source link

Fix issues with Map view iterators and spliterators #232

Closed techsy730 closed 3 years ago

techsy730 commented 3 years ago
techsy730 commented 3 years ago

Actually, I need to revert that second commit. In both the in the JDK and FastUtils, no spliterator implementation backed by an iterator tries to use the iterator in multiple threads. So it is actually safe to use to use them as stream sources.

vigna commented 3 years ago

Ooooook... looks like that part was only partially written. I know, the conditional code is a bit crazy in the hash-based classes. Let me know when this is read to merge as I want to release 8.5.2.

techsy730 commented 3 years ago

Ok, I think we are good now. But do we have any tests for AbstractMap? As in a map type (possible test only) that doesn't implement more then the bare minimum of methods require to extend AbstractMap?

EDIT: Actually, similar question for the other Abstract helpers

vigna commented 3 years ago

Have a look at AbstractInt2IntMapTest.

vigna commented 3 years ago

In general, look in the IDE for AbstractTest.