RFR: 8374808: Add an Instance in place of Date for KeyStore and KeyStoreSpi [v2]
Weijun Wang
weijun at openjdk.org
Wed Jan 14 21:16:33 UTC 2026
On Mon, 12 Jan 2026 11:39:54 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:
>> src/java.base/share/classes/sun/security/provider/DomainKeyStore.java line 238:
>>
>>> 236: }
>>> 237:
>>> 238: /**
>>
>> For this class, does it make sense to rewrite `engineGetCreationDate` like the other implementations?
>
> I believe so, otherwise we will be either getting `Date` as before via `engineGetCreationDate` or have a default implementation from `KeyStoreSpi` which converts the result of `engineGetCreationDate`. This seems to me just an extra operation, which I'm not convinced is necessary.
> However, if you think in this case it might be ok - I'm happy to remove this and simplify.
I would rewrite this `engineGetCreationDate` to call `engineGetCreationInstant` and convert it. After all this code change is about migrating from calling `getCreationDate` and it's called here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29140#discussion_r2691961145
More information about the security-dev
mailing list