On Tue, 25 Mar 2025 12:06:30 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 3507:
>> 
>>> 3505: 
>>> 3506:     /**
>>> 3507:      * Submits a one-shot task that becomes enabled after the given
>> 
>> If the javadoc for the new methods from the ScheduledExecutorService 
>> interface are cut-and-pasted from that interface, then I recommend using the 
>> directed inherit doc feature which would reduce the javadoc text in this 
>> class to something like:
>> 
>> 
>> /**
>>  * {@inheritdoc ScheduledExecutorService }
>>  * @param command   {@inheritdoc ScheduledExecutorService }
>>  * ...
>>  * @throws NullPointerException   {@inheritdoc ScheduledExecutorService }
>>  */
>
> The schedule(Runnable ..) and schedule(Callable ..) methods are a single 
> sentence in the interface. The ForkJoinPool methods has more to say about 
> cancellation and shutdown. So while it could inherit, doesn't seem to be 
> worth it here.
> 
> The descriptions in scheduleAtFixedRate and scheduleWithFixedDelay aren't 
> identity to the interface because there are additional exceptional 
> completions to list. So I don't think these can inherit.

Agreed. The root cause is that ScheduledExecutorService should have mentioned 
interactions with shutdown and cancellation, but didn't so both FJP and 
ScheduledThreadPoolExecutor had to add them (almost identically).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23702#discussion_r2012792242

Reply via email to