As this enhancement is limited to JDK10 this frees us up to explore a different approach.
http://cr.openjdk.java.net/~robm/8160768/webrev.06/ In this webrev we're using the Service Provider Interface to load an implementation of the new LdapDnsProvider class. Implementations of this class are responsible for resolving DNS endpoints for a given ldap url should the default implementation be insufficient in a particular environment. Note: if a security manager is installed the ldapDnsProvider RuntimePermission must be granted. -Rob