RFR: JDK-8133773: clarify specification of Spliterator.tryAdvance [v2]

Viktor Klang duke at openjdk.org
Tue May 9 15:08:19 UTC 2023


On Tue, 9 May 2023 14:22:39 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> @RogerRiggs "the" instead of "a" gives me the impression that the Spliterator only has a single element left. The choice of colon instead of a comma is because "If a remaining element exists" introduces a list of 2 elements (and introducing a list is a good place for a colon) whereas the "else returns {@code false}" is a closely connected sentence to the topic of the list, which seems like a place to use the semi-colon.
>> 
>> But, not being a native English-speaker, I will happily change it to something which is more correct. :)
>
> The switch from "a" to "the" was unintentional.  
> "If a remaining element exists, the action is performed on it, returning true;..."

@RogerRiggs Got it. :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13860#discussion_r1188750200


More information about the core-libs-dev mailing list