On 14/04/2015 17:24, Chris Hegarty wrote:
The work done as part of JDK-8064924 [1] to introduce a new service type, 
java.net.spi.URLStreamHandlerProvider, provides a clean provider mechanism that 
will work well with modules. That part of the change should remain, but the 
removal of support to find handlers through the java.protocol.handler.pkgs 
system property is problematic, and could be an impediment to moving to JDK 9. 
Applications making use of custom protocol handlers and not packaged as modules 
should continue to be able to use this property.

The proposal is to reinstate the JDK 8 specification about java.protocol.handler.pkgs 
in java.net.URL.<init>, that documents the search order for handlers. 
Additionally reinstate the JDK 8 implementation code to search the system property 
after the service loader lookup.

http://cr.openjdk.java.net/~chegar/8075139/webrev.00/

The spec and code changes in the above webrev are almost identical to the 
original code pre 8064924.

-Chris.

[1] https://bugs.openjdk.java.net/browse/JDK-8064924
This looks okay to me although maybe we can use the opportunity to replace the use of StringTokenizer with a regex.

One comment on the javadoc is that it says "the constructors finds the value of the system property", I assume this should be "reads" rather than "finds". Also you can use {@code ...} in the blockquote to avoid the escaping.

-Alan

Reply via email to