RFR: 8338398: Trivially fix grammar and typos [v2]
Pavel Rappo
prappo at openjdk.org
Thu Aug 15 15:44:51 UTC 2024
On Thu, 15 Aug 2024 15:29:22 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix grammatical tense
>
> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 858:
>
>> 856: * usages of ForkJoinTasks ignore interrupt status when executing
>> 857: * or awaiting completion. Otherwise, reporting task results or
>> 858: * exceptions is preferred to throwing InterruptedExceptions,
>
> I wonder whether _“InterruptedExceptions”_ should be marked up with `{@code InterruptedException}`s to refer to the class. As far as I can see, classes and methods aren't marked up with `{@code}` here, so it's better to leave it as is.
That comment is not javadoc, so no need for markup. Although, I agree that this trailing "s" reads ugly because it interferes with the class name.
> src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java line 1076:
>
>> 1074: * Tries to join this task, returning true if it completed
>> 1075: * (possibly exceptionally) before the given timeout elapsed and
>> 1076: * the current thread has not been interrupted.
>
> Suggestion:
>
> * (possibly exceptionally) before the given timeout elapsed and if
> * the current thread has not been interrupted.
>
> Would it be clearer with another _“if”_? I assume, the meaning is “…returning true if it completed … and if the current thread has not been interrupted.”
I'd leave it to @DougLea.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20584#discussion_r1718586858
PR Review Comment: https://git.openjdk.org/jdk/pull/20584#discussion_r1718587545
More information about the core-libs-dev
mailing list