[testbug] RFR: 8217353: java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java fails with Unexpected reference: java.lang.ref.WeakReference

Daniel Fuchs daniel.fuchs at oracle.com
Thu Jan 24 11:42:22 UTC 2019


Hi,

Please find below a fix for:

8217353: 
java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java 

           fails with Unexpected reference: java.lang.ref.WeakReference
https://bugs.openjdk.java.net/browse/JDK-8217353

webrev:
http://cr.openjdk.java.net/~dfuchs/webrev_8217353/webrev.00/

This test has been seen failing from time to time with an
exception originating from the finally { } clause of the
main method. The suspicion is that this exception in fact
hides another exception previously thrown in the try { }
body.

This is only a fix in so far that it will ensure that the
real exception - if any - is added to the suppressed list
of the secondary exception so that we eventually see it in
the log.

As to why the test failed in the first place - I am not quite
sure, but it might be due to -Xcomp or some other combination
of options preventing the WeakReference to be cleared within
the time (and number of gc() calls) expected by the test
(the test has never been seen failing without these combinations).

best regards,

-- daniel


More information about the core-libs-dev mailing list