RFR: 8290005: com/sun/jndi/ldap/LdapCBPropertiesTest.java failling with NullPointerException [v2]

Xue-Lei Andrew Fan xuelei at openjdk.org
Fri Jul 14 16:47:11 UTC 2023


On Fri, 14 Jul 2023 14:16:00 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

> TransportContext also has a `protocolVersion` field. Is it possible to just use that instead?

Did you mean a change in duplexCloseOutput() like the following?


-           // The protocol version may have been negotiated.
-           ProtocolVersion pv = conContext.handshakeContext.negotiatedProtocol;
+           // The protocol version may have been negotiated.  The 
+           // conContext.handshakeContext.negotiatedProtocol is not used as there
+           // may be a race to set it to null.
+          ProtocolVersion pv = conContext.protocolVersion;
            if (pv == null || (!pv.useTLS13PlusSpec())) {
                hasCloseReceipt = true;
            }       


I like the idea as it looks like a safe update in the current implementation.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13742#discussion_r1263934419


More information about the security-dev mailing list