On Thu, 21 Jan 2021 18:19:10 GMT, Aleksei Efimov <[email protected]> wrote:

>> Alexey Bakhtin has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   separate tlsHandshakeCompleted for every StartTLS connection
>
> src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java line 1034:
> 
>> 1032:     }
>> 1033: 
>> 1034:     private HandshakeListener tlsHandshakeListener;
> 
> I believe that `volatile` modifier should be added here. And it could be 
> beneficial for future maintainers to have here a comment block with a brief 
> description of when `tlsHandshakeListener` is used.

Agree. Added comments and volatile modifier.

> src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java line 1059:
> 
>> 1057:     private class HandshakeListener implements 
>> HandshakeCompletedListener {
>> 1058: 
>> 1059:         private CompletableFuture<X509Certificate> 
>> tlsHandshakeCompleted =
> 
> `tlsHandshakeCompleted` could be made `final`

Thank you. Made it final

-------------

PR: https://git.openjdk.java.net/jdk/pull/2085

Reply via email to