[8u] RFR 8160768: Add capability to custom resolve host/domain names within the default JNDI LDAP provider

Severin Gehwolf sgehwolf at redhat.com
Thu Aug 13 20:33:13 UTC 2020


Hi Zhengyu,

On Thu, 2020-08-13 at 08:49 -0400, Zhengyu Gu wrote:
> 
> On 8/13/20 5:51 AM, Severin Gehwolf wrote:
> > On Tue, 2020-08-11 at 14:48 -0400, Zhengyu Gu wrote:
> > > Hi Michael,
> > > 
> > > > My tests/comments:
> > > > * @since still says 12. Is that correct?
> > 
> > I agree. Zhengyu, please remove the @since 12 tags in this backport. It
> > doesn't make sense to have them in either 11 or 8.
> 
> Okay, updated:
> 
> http://cr.openjdk.java.net/~zgu/JDK-8160768-8u/jdk/webrev.03/
> 
> Could I get formal review?

  59     public LdapDnsProviderResult(String domainName, List<String> endpoints) {
  60         this.domainName = (domainName == null) ? "" : domainName;
  61         this.endpoints = new ArrayList<>();
  62         this.endpoints.addAll(endpoints);

Lines 61 and 62 can be simplified to:

this.endpoints = new ArrayList<>(endpoints);


com.sun.jndi.ldap.spi.LdapDnsProvider:

  33 /**
  34  * Service-provider class for DNS lookups when performing LDAP operations.
  35  *
  36  * <p> An LDAP DNS provider is a concrete subclass of this class that
  37  * has a zero-argument constructor. LDAP DNS providers are located using the
  38  * ServiceLoader facility, as specified by
  39  * {@linkplain javax.naming.directory.InitialDirContext InitialDirectContext}.

I believe this refers to the the added javadoc in the original changeset:
http://hg.openjdk.java.net/jdk/jdk/rev/a609d549992a#l5.15

This doc change has been left out as specified by the CSR[1]. However,
it leaves some details as to how this works to be desired. I wonder if
we should add some documentation in place of the reference here, or
remove the reference entirely. It seems doing the former would make
more sense.

Thanks,
Severin

[1] https://bugs.openjdk.java.net/browse/JDK-8251270



More information about the jdk8u-dev mailing list