On 10/8/2013 1:06 PM, Alan Bateman wrote:
On 08/10/2013 18:19, Daniel Fuchs wrote:
Hi,

Please find below a fix for:

8024704: Improve API documentation of ClassLoader and ServiceLoader
         with respect to enumeration of resources.
<https://bugs.openjdk.java.net/browse/JDK-8024704>

This is a clarification of the implementation of the
ServiceLoader.iterator() method, as well as non normative advice
for ClassLoader subclasses overriding getResource() or getResources()
to consider overriding the other method in order to keep them
consistent with each other.

<http://cr.openjdk.java.net/~dfuchs/webrev_8024704/webrev.00/>

Daniel - the spec update looks okay to me.

As background to others, the motive for this one stems from a small compatibility issue that arose with the JAXP changes to use ServiceLoader (it was previous foraging for service configuration files itself). The compatibility issue arises with ClassLoader implementations where getResource and getResources are inconsistent, and in the JAXP case uncovered a server that located an unexpected XML parser.


It'd be interesting to find out how many custom ClassLoader implements the getResource and getResources inconsistently but this might not be easy.

Mandy

Reply via email to