RFR: 8372661: Add a null-safe static factory method to "jdk.test.lib.net.SimpleSSLContext" [v2]

Daniel Fuchs dfuchs at openjdk.org
Thu Dec 11 18:57:56 UTC 2025


On Thu, 11 Dec 2025 18:13:26 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> Overhauls `SimpleSSLContext` to remove the need for null checks at the call site, and to accept a key store file search path, which removes the need to copy-paste `SimpleSSLContext` just to change the search path.
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Reverted all changes and only kept `SimpleSSLContext` enhancements

test/lib/jdk/test/lib/net/SimpleSSLContext.java line 159:

> 157:         }
> 158:     }
> 159: 

I believe you need to keep the `ssl` instance variable here, and return that if not null.  Or set it in the constructor. As we have seen with httpclient test sharing the same context can lead to subtle behavioral difference, so it would be better if this change didn't bring behavioral changes to the old API.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28765#discussion_r2611717420


More information about the net-dev mailing list