ServiceLoader double iterator issues
- by buge
Is this a known issue? I had trouble finding any search results.
When iterating over a ServiceLoader while an iteration already is in progress, the first iteration will be aborted. For example, assuming there are at least two implementations of Foo, the following code will fail with an AssertionError:
ServiceLoader<Foo> loader =…