RFR: 8293819: sun/util/logging/PlatformLoggerTest.java failed with "RuntimeException: Retrieved backing PlatformLogger level null is not the expected CONFIG"

Jaikiran Pai jpai at openjdk.org
Thu Sep 15 15:02:48 UTC 2022


On Thu, 15 Sep 2022 14:38:54 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> test/jdk/sun/util/logging/PlatformLoggerTest.java line 136:
>> 
>>> 134:                 logger.getName() + " " + logger.getLevel());
>>> 135:         }
>>> 136:         Reference.reachabilityFence(logger);
>> 
>> Hello Daniel, I don't follow why the reachabilityFence would be needed here for the `logger`. Wouldn't the `logger` already be reachable till the `if` block evaluation is complete?
>
> Yes - it's not strictly needed here - I added it for symmetry in case we add more checks to the method.
> I also suspect that the only place where it's needed is at line 179, since all other loggers are saved into statics. 
> But better safe than sorry :-)

That sounds fine to me then.

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

PR: https://git.openjdk.org/jdk/pull/10284


More information about the core-libs-dev mailing list