RFR: 8373538: Migrate all tests to null-safe "SimpleSSLContext" methods

Mikhail Yankelevich myankelevich at openjdk.org
Fri Dec 19 15:55:31 UTC 2025


On Thu, 18 Dec 2025 18:32:57 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

> 1. [JDK-8372661] introduced null-safe static factory methods to `SimpleSSLContext`
> 2. [JDK-8373515] migrated `test/jdk/java/net/httpclient/` to these new methods
> 3. [JDK-8373537] migrated `test/jdk/com/sun/net/httpserver/` to these new methods
> 4. This PR migrates all remaining `SimpleSSLContext` usages, *and* removes nullable `SimpleSSLContext` factory methods
> 
> [JDK-8372661]: https://bugs.openjdk.org/browse/JDK-8372661
> [JDK-8373515]: https://bugs.openjdk.org/browse/JDK-8373515
> [JDK-8373537]: https://bugs.openjdk.org/browse/JDK-8373537

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

> 28: import java.util.*;
> 29: import java.io.*;
> 30: import java.security.*;

nit: Could you please convert wildcard imports?

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

> 40:     private static final String DEFAULT_KEY_STORE_FILE_REL_PATH = "jdk/test/lib/net/testkeys";
> 41: 
> 42:     private SimpleSSLContext() {}

Is there any particular reason for an empty constructor here? Can't you just remove it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28905#discussion_r2635519481
PR Review Comment: https://git.openjdk.org/jdk/pull/28905#discussion_r2635516135


More information about the net-dev mailing list