RFR: 8364822: Comment cleanup, stale references to closeDescriptors and UNIXProcess.c
Kevin Walls
kevinw at openjdk.org
Thu Aug 7 10:28:15 UTC 2025
On Thu, 7 Aug 2025 10:17:05 GMT, Guanqiang Han <ghan at openjdk.org> wrote:
>> src/hotspot/os/linux/os_linux.cpp line 4876:
>>
>>> 4874: // flag set. If we don't set it, then careless 3rd party native code
>>> 4875: // might fork and exec without closing all appropriate file descriptors
>>> 4876: // , and this in turn might:
>>
>> Shouldn't the comma go to the previous line?
>
> @fandreuz Thanks for your comment!
>
> You're right to point this out — I am not sure about the best placement either. I noticed that some other parts of the codebase use the same style (with the comma at the beginning of the line), so I followed that pattern here.
>
> That said, I'm happy to adjust it if needed. Let's leave it to @kevinjwalls to make the final call.
Hi, it's a good review comment, beginning a line with a comma is not normal, we should keep the comma on the previous line.
I see some javadoc that does this, but in the examples I found, there are slightly complex constructs on the previous line, so you can more easily see it's correct if comma is split, like:
751 * {@code (CT1 ct1, ..., CTn ctn)}
752 * , statically represented using varargs.
But javadoc is also reformatted for humans, so the comma will not be split in the version people read. 8-)
Here we should stay with the English style, and not separate the comma, thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26667#discussion_r2259852367
More information about the core-libs-dev
mailing list