On Wed, 4 May 2022 03:10:10 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> Mat Carter has updated the pull request incrementally with one additional >> commit since the last revision: >> >> replace string parameter with int and supporting constants > > src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/CKeyStore.java line > 256: > >> 254: private final KeyStoreLocation storeLocation; >> 255: >> 256: CKeyStore(String storeName, KeyStoreLocation storeLocation) { > > Why not just an `int` here? The creation of a separate class > `keyStoreLocation` seems not necessary. If you want code to be readable, just > add `public static final int CURRENTUSER = 0`, etc. I was using type safety to remove the chance of non-expected values being passed to the C function. Implemented your recommendation as its a simple contract between two files ------------- PR: https://git.openjdk.java.net/jdk/pull/8211