< prev index next >

test/jdk/java/lang/annotation/loaderLeak/Main.java

Print this page
rev 55753 : 8225648: [TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp
Reviewed-by: alanb, iklam

*** 1,7 **** /* ! * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 54,63 **** --- 54,64 ---- System.gc(); System.gc(); if (c.get() == null) throw new AssertionError(); System.gc(); System.gc(); + Reference.reachabilityFence(loader); loader = null; // Might require multiple calls to System.gc() for weak-references // processing to be complete. If the weak-reference is not cleared as // expected we will hang here until timed out by the test harness.
< prev index next >