RFR: 8373538: Migrate all tests to null-safe "SimpleSSLContext" methods [v2]
Volkan Yazici
vyazici at openjdk.org
Fri Dec 19 17:40:16 UTC 2025
On Fri, 19 Dec 2025 15:50:45 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:
>> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove 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?
To indicate that this is a singleton and should not be instantiated. I would have preferred using an `enum` (as advised by Joshua Bloch in _"Effective Java"_), but that is a foreign practice in the OpenJDK code base, AFAICT, hence, I refrained from it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28905#discussion_r2635821557
More information about the net-dev
mailing list