Weijun's comments

This commit is contained in:
Mikhail Yankelevich 2026-01-09 16:19:13 +00:00
parent ecbc6bfa1a
commit 711fa0baec
2 changed files with 9 additions and 1 deletions

View File

@ -1183,6 +1183,8 @@ public class KeyStore {
/**
* Returns the creation date of the entry identified by the given alias.
* <p>
* Please consider using {@code getCreationTimestamp} instead.
*
* @param alias the alias name
*

View File

@ -132,13 +132,19 @@ public abstract class KeyStoreSpi {
* Returns the creation timestamp (Instant) of the entry identified
* by the given alias.
*
* @implSpec This method simply performs
* {@code engineGetCreationDate(alias)} which returns a {@code Date}.
* If the result is not @{code null} returns
* Instance equivalent to received {@code Date}.
*
* @param alias the alias name
*
* @return the creation instant of this entry, or {@code null}
* if the given alias does not exist
*/
public Instant engineGetCreationTimestamp(String alias) {
return engineGetCreationDate(alias).toInstant();
final Date date = engineGetCreationDate(alias);
return date == null? null : date.toInstant();
}
/**