RFR: 8374808: Add new methods to KeyStore and KeyStoreSpi that return the creation date as an Instant instead of Date [v2]
Mikhail Yankelevich
myankelevich at openjdk.org
Thu Jan 15 10:52:56 UTC 2026
On Wed, 14 Jan 2026 21:52:19 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
>>
>> DKS tests enhanced
>
> src/java.base/share/classes/java/security/KeyStore.java line 1187:
>
>> 1185: * Returns the creation date of the entry identified by the given alias.
>> 1186: * <p>
>> 1187: * This method returns a Date, which is mutable and more error-prone.
>
> I think this could be misinterpreted to mean that the KeyStore's internal Date is mutable, when implementations typically should be returning new objects or clones. Suggest something simpler like "It is recommended to use the {@link #getCreationInstant(String)} method instead."
Changed in the next commit
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29140#discussion_r2693890166
More information about the security-dev
mailing list