On 2017/6/21 19:43, Alan Bateman wrote:
On 21/06/2017 09:27, Hamlin Li wrote:
:
Besides of it, I have some minor comments about the doc:
In section "Timing of provider discovery", it says as below:
Each invocation of the|iterator|method returns an|Iterator|that first
yields all of the elements cached from previous iteration, in
**instantiation order**, and then lazily locates and instantiates any
remaining providers, adding each one to the cache in turn.
But in API doc for iterator(), it says:
Caching: The iterator returned by this method first yields all of the
elements of the provider cache, in **the order that they were loaded**
There is an inconsistency here, it would be clearer to say that it's
the order that they were loaded and instantiated. This wording has
been there since Java SE 6 but I agree it all needs to be re-examined.
So at some point there will be another big update to the ServiceLoader
javadoc but more likely to be for Java SE 10 given that JDK 9 is at
GAC this week.
Hi Alan,
Got it, Thank you for planing to update it, especially for "load" and
"instantiate", in several places they are used in a mixed way.
Thank you
-Hamlin
-Alan