RFR: TEST_BUG: 8222027 - java/util/logging/LogManager/TestLoggerNames.java generates intermittent ClassCastException
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Apr 5 12:48:58 UTC 2019
Hi Steve,
On 05/04/2019 13:14, Steve Groeger wrote:
> Hi Daniel,
>
> Thanks for the quick review.
> I too didnt see why the test wanted to obtain the TestLogger from the
> LogManager, but I left it doing that just in case there was a reason.
> If you think this is not needed then I agree with your suggested
> modifications. I have created a new webrev here:
> _http://cr.openjdk.java.net/~sgroeger/8222027/webrev.01/_
Perfect! Maybe remove the trailing " for" in
throw new AssertionError("wrong logger returned for");
Sorry - that was my mistake...
No need for a new webrev.
Reviewed.
best regards,
-- daniel
> Hopefully I understood what you were saying and these modification are
> OK. Please can you re-review these and let me know if OK.
>
> Thanks
> Steve Groeger
> IBM Runtime Technologies
> Hursley, Winchester
> Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129
> Fax (44) 1962 816800
> Lotus Notes: Steve Groeger/UK/IBM
> Internet: groeges at uk.ibm.com
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
> From: Daniel Fuchs <daniel.fuchs at oracle.com>
> To: Steve Groeger <GROEGES at uk.ibm.com>, OpenJDK Core Libs Developers
> <core-libs-dev at openjdk.java.net>
> Date: 05/04/2019 12:33
> Subject: Re: RFR: TEST_BUG: 8222027 -
> java/util/logging/LogManager/TestLoggerNames.java generates intermittent
> ClassCastException
> ------------------------------------------------------------------------
>
>
>
> Hi Steve,
>
> Good analysis! I believe we can make the fix even
> more simpler by simply moving:
>
> TestLogger test = new TestLogger(..);
> LogManager.getLogManager().addLogger(test);
>
> at the beginning of main. If we do that then we can get
> rid of the new local variable 'tl' and of the
> reachabilityFence() call.
>
> I see no real reason why the test wants to obtain
> the TestLogger test from the LogManager.
>
> If you wanted to be extra cautious in preserving the original
> test then you could also add:
>
> if (test != Logger.getLogger("com.foo.bar.zzz")) {
> throw new AssertionError("wrong logger returned for");
> }
>
> in place of line 149...
>
> best regards,
>
> -- daniel
>
> On 05/04/2019 11:59, Steve Groeger wrote:
> > Hi all,
> >
> > Please could I have a review for this bug:
> > https://bugs.openjdk.java.net/browse/JDK-8222027
> >
> > The webrev is here:
> > http://cr.openjdk.java.net/~sgroeger/8222027/webrev.00/
> >
> > Thanks
> > Steve Groeger
> > IBM Runtime Technologies
> > Hursley, Winchester
> > Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129
> > Fax (44) 1962 816800
> > Lotus Notes: Steve Groeger/UK/IBM
> > Internet: groeges at uk.ibm.com
> >
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
> PO6 3AU
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
> PO6 3AU
> >
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
More information about the core-libs-dev
mailing list