On Apr 14, 2015, at 9:33 PM, Alan Bateman <alan.bate...@oracle.com> wrote:
> 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. > Yes, one could use a Pattern.splitAsStream, sorry could not resist :-) assuming this area is not sensitive to bootstrap issues e.g. hander = p.splitAsStream().map(String::trim).flatMap(this::getHandler).findFirst().orElse(null); Paul.
signature.asc
Description: Message signed with OpenPGP using GPGMail