On 23/11/2020 08:28, Alex Orlov wrote:
I don’t agree with that. It returns the object that is an instance of the service.
The method returns an instance of the service provider.
The enhancements to ServiceLoader in Java 9 were tracked as #ServiceLoaderEnhancements [1], the link to "Proposal" has a good summary of the update.
-Alan[1] https://openjdk.java.net/projects/jigsaw/spec/issues/#ServiceLoaderEnhancements