RFR: 8302496: Runtime.exit incorrectly says it never throws an exception

Stuart Marks smarks at openjdk.org
Mon May 1 16:24:53 UTC 2023


On Mon, 1 May 2023 05:33:00 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Yeah I had some misgivings mentioning the SM first, but if it's not mentioned, then the assertions in the rest of the text become hedged and uncertain. The SM, checkExit, and whether the exit value is allowed all have to be mentioned somewhere anyway. It would be awkward to try to wedge all of this into a subordinate or parenthetical clause of some other sentence.
>> 
>> Even though we know the SM is on the way out, it's still part of Java SE 21, and it ought to be specified correctly. When the SM is actually removed, we'll have to revisit these specs anyway. Choosing different wording now won't make the future change any easier or harder.
>
> One thing you could do is reduce the words down to something like "Unless denied exiting by the security manager, this method blocks indefinitely ..." to avoid complicating the first paragraph with something that only arises with a niche execution mode. If needed, a later paragraph could have this detail, or just leave it to the existing @throws text where the permission check is specified.

OK, that works. I'll develop an update.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13706#discussion_r1181688244


More information about the core-libs-dev mailing list