JDK 9 RFR for 8031068: java/util/logging/ParentLoggersTest.java: checkLoggers: getLoggerNames() returned unexpected loggers
daniel.fuchs at oracle.com
Wed Jan 8 17:55:05 UTC 2014
On 1/8/14 6:48 PM, Chris Hegarty wrote:
> The cleanup looks fine to me, and the retaining of strong refs to the loggers.
> Is the weak ref guaranteed to be cleared at some point?
Hopefully yes - my experiments show that it's cleared at the
Do you think I should add a counter - or remove that call to
This was just a means of triggering 8031068 and making the test
fail more consistently (it just validates that this is the
right fix for 8031068).
>> On 8 Jan 2014, at 17:34, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
>> Please find below a patch for a test bug:
>> 8031068: java/util/logging/ParentLoggersTest.java:
>> checkLoggers: getLoggerNames() returned unexpected loggers
>> As usual - the issue is that the test creates loggers without
>> keeping any strong reference - thus allowing for the possibility
>> that they will be garbage collected too soon.
>> I managed to reproduce systematically by adding a call to
>> System.gc() between the creation of the two loggers - and
>> passing -Xcomp -server to the VM.
>> With the fix the test no longer fails in that configuration.
>> best regards,
>> -- daniel
More information about the core-libs-dev