On Mon, 11 May 2026 09:46:42 GMT, Mikhail Yankelevich 
<[email protected]> wrote:

>> Adding new methods to `X509Certificate` to return `Instant` instead of 
>> `Date` as well as moving away from `Date` in internal packages wherever 
>> possible.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Mikhail Yankelevich has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   comments

src/java.base/share/classes/java/security/cert/X509Certificate.java line 127:

> 125: 
> 126:     /**
> 127:      * Checks that the certificate is currently valid. It is if

To be more clear, say "It is valid if ..." I know you copied this from the 
prior methods, so please change that text as well. Same comment applies to 
other `checkValidity` methods.

src/java.base/share/classes/java/security/cert/X509Certificate.java line 128:

> 126:     /**
> 127:      * Checks that the certificate is currently valid. It is if
> 128:      * the current time are within the validity period given in the

s/are/is/

src/java.base/share/classes/java/security/cert/X509Certificate.java line 131:

> 129:      * certificate.
> 130:      * <p>
> 131:      * The validity period consists of two time values:

I prefer if we use the term "date" to be consistent with RFC 5280, but we can 
reword this: "The validity period consists of two dates, defined as two time 
values:"

src/java.base/share/classes/java/security/cert/X509Certificate.java line 132:

> 130:      * <p>
> 131:      * The validity period consists of two time values:
> 132:      * the first and last times on which the certificate is valid.

s/times/dates/

src/java.base/share/classes/java/security/cert/X509Certificate.java line 344:

> 342: 
> 343:     /**
> 344:      * Gets the {@code notBefore} time as an {@code Instant} from the 
> validity

s/time/date/ (to be consistent with RFC 5280).

src/java.base/share/classes/java/security/cert/X509Certificate.java line 379:

> 377: 
> 378:     /**
> 379:      * Gets the {@code notAfter} time as an {@code Instant} from the 
> validity

s/time/date/ (to be consistent with RFC 5280).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3221446338
PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3221435255
PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3221516333
PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3221517156
PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3221523277
PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3221527098

Reply via email to