On Fri, 3 Apr 2026 13:38:10 GMT, Weijun Wang <[email protected]> wrote:

>> Mikhail Yankelevich has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   minor doc change
>
> src/java.base/share/classes/java/security/cert/X509Certificate.java line 383:
> 
>> 381:     public Instant getNotBeforeInstant() {
>> 382:         final Date date = getNotBefore();
>> 383:         return date == null ? null : date.toInstant();
> 
> Now that we are creating a new API, can we require the return values to be 
> non-null? Even if there is no guarantee what a bad implementation could do, 
> we can probably add an `@implSpec` for it. I briefly checked the callers of 
> these methods and seems no one expects a null.
> 
> Our default implementation can fail noisily here.

Will introduce an NPE if null is returned

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3044361953

Reply via email to