mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-14 04:15:04 +00:00
Weijun's comments
This commit is contained in:
parent
ecbc6bfa1a
commit
711fa0baec
@ -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
|
||||
*
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user