On Mon, 14 Oct 2024 07:38:28 GMT, Alisen Chung <ach...@openjdk.org> wrote:
> Second set of dialog swing tests to open during fall 2024 test sprint test/jdk/java/awt/Dialog/DialogDisposeLeak.java line 38: > 36: */ > 37: > 38: public class DialogDisposeLeak { It looks like this test was oversimplified, as I no longer see steps to reproduce the original issue. https://bugs.openjdk.org/browse/JDK-4193022 > Container.trackMouseEnterExit() calls startListeningForOtherDrags() when the > mouse pointer enters the container. It calls stopListeninForOtherDrags() when > the mouse exits the container. > > If the container is a window (in our case a JDialog), and the dispose() > method is called while the mouse pointer is within the window (user clicks on > the 'ok' button, for example), then the window is disposed, but no mouse exit > event occurs. > > This causes the window and everything it points to not to be collectable, as > there is still the Container drag listener pointing at the window. test/jdk/java/awt/Dialog/DialogDisposeLeak.java line 42: > 40: > 41: public static void main(String args[]) throws Exception { > 42: EventQueue.invokeLater(() -> { Suggestion: EventQueue.invokeAndWait(() -> { The test may prematurely end with `invokeLater` even before it starts testing anything, because jtreg will kill it after exiting the main. test/jdk/java/awt/Dialog/FileDialogTest.java line 39: > 37: * @bug 4105025 4153487 4177107 4146229 4119383 4181310 4152317 > 38: * @summary Test: FileDialogTest > 39: * @library /open/test/jdk/java/awt/regtesthelpers This won't compile, please fix the path here and in the other tests Suggestion: * @library /java/awt/regtesthelpers test/jdk/java/awt/TextArea/TextAreaHScrollbarTest.java line 1: > 1: /* These text area tests appear to be unrelated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21488#discussion_r1799812103 PR Review Comment: https://git.openjdk.org/jdk/pull/21488#discussion_r1799807771 PR Review Comment: https://git.openjdk.org/jdk/pull/21488#discussion_r1799820746 PR Review Comment: https://git.openjdk.org/jdk/pull/21488#discussion_r1799814342