8202878: com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java fails
Reviewed-by: prr
This commit is contained in:
parent
fd8df3adf1
commit
684b4f7551
@ -751,7 +751,6 @@ javax/swing/JPopupMenu/8075063/ContextMenuScrollTest.java 202880 linux-all
|
||||
javax/swing/dnd/8139050/NativeErrorsInTableDnD.java 8202765 macosx-all,linux-all
|
||||
javax/swing/plaf/nimbus/8057791/bug8057791.java 8202877 macosx-all
|
||||
javax/swing/Popup/TaskbarPositionTest.java 8065097 macosx-all,linux-all
|
||||
com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java 8202878 macosx-all
|
||||
java/awt/im/memoryleak/InputContextMemoryLeakTest.java 8023814 linux-all,solaris-all
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, 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
|
||||
@ -24,9 +24,11 @@
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @bug 8158325 8180821
|
||||
* @bug 8158325 8180821 8202878
|
||||
* @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced
|
||||
* @requires (os.family == "mac")
|
||||
* @library /javax/swing/regtesthelpers
|
||||
* @build Util
|
||||
* @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest
|
||||
*/
|
||||
|
||||
@ -44,8 +46,6 @@ import javax.swing.WindowConstants;
|
||||
|
||||
public class ScreenMenuMemoryLeakTest {
|
||||
|
||||
private static byte[] sBytes;
|
||||
|
||||
private static WeakReference<JMenuItem> sMenuItem;
|
||||
private static JFrame sFrame;
|
||||
private static JMenu sMenu;
|
||||
@ -65,9 +65,8 @@ public class ScreenMenuMemoryLeakTest {
|
||||
removeMenuItemFromMenu();
|
||||
}
|
||||
});
|
||||
System.gc();
|
||||
System.runFinalization();
|
||||
Thread.sleep(1000);
|
||||
|
||||
Util.generateOOME();
|
||||
JMenuItem menuItem = sMenuItem.get();
|
||||
EventQueue.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user