RFR: 8367597: Runtime.exit logging failed: Cannot invoke "java.lang.Module.getClassLoader()" because "m" is null [v2]

Jaikiran Pai jpai at openjdk.org
Sat Sep 13 07:36:50 UTC 2025


On Sat, 13 Sep 2025 07:25:50 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Alan's review - move the VM.isBooted() check outside try block
>
> src/java.base/share/classes/java/lang/Shutdown.java line 177:
> 
>> 175:     private static void logRuntimeExit(int status) {
>> 176:         try {
>> 177:             if (!VM.isBooted()) {
> 
> Can you move it to the top of the method so that the isBooted check isn't in the try-catch block? isBooted shouldn't throw but if it did then we wouldn't want the logging exception handler running.

Done - I've updated the PR with this change.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27270#discussion_r2346009597


More information about the core-libs-dev mailing list