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

Michael Osipov 1983-01-06 at gmx.net
Fri Aug 7 09:47:57 UTC 2020


Hi Zhengyu,

here is my static review, compilation and tests will follow: The code is 
the same as with JDK 12+. Good, but you need to move LdapDnsProvider and 
LdapDnsProviderResult to com.sun.jndi.ldap.spi. Both Oracle JDK 8u and 
11u have this integrated in this package because it is not allowed to 
change the public API. I am also in touch with Christoph Langer 
regarding a backport to OpenJDK 11u. We have agreed to use the same 
package as Oracle did in its distributions. With that change you can 
swap OpenJDK for Oracle JDK and vice versa.

My real world code works flawlessly with Oracle JDK 8 and 11 w/o change 
or recompilation.

Michael

Am 2020-08-06 um 22:40 schrieb Hohensee, Paul:
> In InitialDirContext.java, the new comments use @code instead of the <tt> </tt> pair prevalent in JDK 8. Would be worth checking the Javadoc to see if there's any real difference. If there is, replace the @code uses with <tt></tt> pairs. Fwiw, I've done that when backporting javadoc before.
> 
> I ran the test/com/sun/jndi/ldap/ tests with your patch on my Linux box. Your new tests pass, the old ones perform the same as before the patch.
> 
> On 8/5/20, 6:52 AM, "Zhengyu Gu" <zgu at redhat.com> wrote:
> 
>      Hi Paul,
> 
>      Sorry for replying late. Somehow, this email slipped through the cracks,
>      and thanks Michael for bringing it to my attention.
> 
> 
>      On 7/13/20 5:27 PM, Hohensee, Paul wrote:
>      > The webrev looks it's corrupted. E.g., it includes the changes from 8217606, and not the InitialDirContext.java and CheckConfigs.policy changes you mention.
> 
>      It had dependence on 8217606, now it is pushed, so that the webrev is
>      much cleaner.
> 
>      Updated: http://cr.openjdk.java.net/~zgu/JDK-8160768-8u/jdk/webrev.01/
> 
>      Test:
>         Reran jdk_other.
> 
>      Thanks,
> 
>      -Zhengyu
> 
> 
> 
>      >
>      > Paul
>      >
>      > On 7/9/20, 1:39 PM, "jdk8u-dev on behalf of Zhengyu Gu" <jdk8u-dev-retn at openjdk.java.net on behalf of zgu at redhat.com> wrote:
>      >
>      >      Hi,
>      >
>      >      I would like to backport this patch to 8u for parity with Oracle 8u261.
>      >
>      >      The original patch does not apply cleanly.
>      >
>      >      Other than a couple of minor conflicts:
>      >
>      >      1) Comments in InitialDirContext.java did not apply cleanly
>      >      2) Unpatched CheckConfigs.policy files did not match
>      >
>      >      I made following modification for 8u:
>      >
>      >      1) Removed module-info.java section, it does not apply to 8u.
>      >      2) LdapDnsProvider.java and LdapDnsProviderResult.java use APIs
>      >      (List.copyOf() and List.of()) that do not exist in jdk8. Rewrote the
>      >      code with ArrayList<String>.
>      >      3) Removed @modules annotation in LdapDnsProviderTest.java
>      >
>      >      Additional, I need to modify langtools to get javac to take
>      >      com.sun.jndi.ldap.spi package and complain about it.
>      >
>      >      Original bug: https://bugs.openjdk.java.net/browse/JDK-8160768
>      >      Original patch: http://hg.openjdk.java.net/jdk/jdk/rev/a609d549992a
>      >
>      >      8u jdk webrev: http://cr.openjdk.java.net/~zgu/JDK-8160768-8u/jdk/webrev.00/
>      >      8u langtools webrev:
>      >      http://cr.openjdk.java.net/~zgu/JDK-8160768-8u/langtools/webev.00/
>      >
>      >
>      >      Test:
>      >         jdk_other on Linux x86_64
>      >
>      >      Thanks,
>      >
>      >      -Zhengyu
>      >
>      >
>      >
> 
> 




More information about the jdk8u-dev mailing list