[8u] 8217606: LdapContext#reconnect always opens a new connection

Hohensee, Paul hohensee at amazon.com
Mon Jul 13 17:19:37 UTC 2020


There's an extra blank line in your version just before the try/catch, and looks like you added a finally clause in BaseLdapServer.handleConnection(). The latter is a good reliability addition, but I'd fix it in upstream and backport it separately.

Thanks,
Paul

On 7/13/20, 9:11 AM, "jdk8u-dev on behalf of Zhengyu Gu" <jdk8u-dev-retn at openjdk.java.net on behalf of zgu at redhat.com> wrote:

    On 6/29/20 3:55 PM, Zhengyu Gu wrote:
    > Hi,
    >
    > I would like to backport this patch to 8u for Oracle 8u271 parity.
    >
    > The original patch does not apply cleanly.
    >
    > LdapCtx.java:
    > 8u does not have 'reconnect' member, so removing the variable lines do
    > not apply.
    >
    > Reconnect.java:
    > Uses try-catch-with-resource statement, which does not exist in 8u.
    > Converted to try-catch-finally.
    try-with-resource here works find.

    Updated: http://cr.openjdk.java.net/~zgu/JDK-8217606-8u/webrev.01/

    Thanks,

    -Zhengyu

    > Uses 'var' language feature, which does not exist in 8u. Converted
    > accordingly.
    >
    > BaseLdapServer.java:
    > The same issues as Reconnect.java, fixed accordingly.
    > Uses System.Logger, which does not exist in 8u. Converted to
    > java.util.logging.Logger.
    >
    > Original bug: https://bugs.openjdk.java.net/browse/JDK-8217606
    > Original patch: https://hg.openjdk.java.net/jdk/jdk/rev/6717d7e59db4
    >
    > 8u webrev: http://cr.openjdk.java.net/~zgu/JDK-8217606-8u/webrev.00/
    >
    > Test:
    >    test/com/sun/jndi/ldap/LdapCtx/Reconnect.java
    >
    > Thanks,
    >
    > -Zhengyu
    >
    >
    >
    >




More information about the jdk8u-dev mailing list