RFR: 8304956: Update KeyStore.getDefaultType​() specification to return pkcs12 as fallback [v4]

Sean Mullan mullan at openjdk.org
Wed Sep 20 19:02:46 UTC 2023


On Wed, 20 Sep 2023 15:52:26 GMT, Ben Perez <duke at openjdk.org> wrote:

>> Replaced "jks" with "pkcs12" in both the spec and fallback for `KeyStore.getDefaultType()`
>
> Ben Perez has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Changed test description, fixed indentation

test/jdk/java/security/KeyStore/PKCS12/CheckNullDefault.java line 34:

> 32:  * KeyStore.getDefaultType() returns pkcs12
> 33:  * @run main/othervm CheckDefaults
> 34:  *  -Djava.security.properties=./java.security

It is probably safer to specify the path as `${test.src}/java.security` here. Also, I typically put the JVM arguments before the test name, so `@run main/othervm -Djava.security.properties=${test.src}/java.security CheckDefaults`

test/jdk/java/security/KeyStore/PKCS12/CheckNullDefault.java line 38:

> 36: public class CheckNullDefault {
> 37:     private static final String DEFAULT_KEY_STORE_TYPE = "pkcs12";
> 38:     private void runTest(String[] args) {

The `runTest` method seems unnecessary. I think you can write this test entirely within the `static main` method.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15625#discussion_r1332055771
PR Review Comment: https://git.openjdk.org/jdk/pull/15625#discussion_r1332058211



More information about the security-dev mailing list