On Thu, 18 Mar 2021 14:38:18 GMT, Marius Hanl 
<github.com+66004280+mara...@openjdk.org> wrote:

> When DialogPane#getButtonTypes().setAll() is called twice with the same 
> argument(s), DialogPane#lookupButton does not return the node which is shown 
> inside the button bar.
> This is due DialogPane adding two list change listeners to 'buttons' 
> (#getButtonTypes). They have the wrong order, which will result in the button 
> bar not changing at all and the 'buttonNodes' list will recreate the dialog 
> button(s).
> Finally, this will make DialogPane#lookupButton returning the 'wrong' button, 
> which is in fact not used inside the dialog button bar.

The fix and test look fine. There is one needed change as noted below.

modules/javafx.controls/src/test/java/test/javafx/scene/control/DialogPaneTest.java
 line 2:

> 1: /*
> 2:  * Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights 
> reserved.

You need to revert this change. There must be only a single year listed if the 
start year and last modified year are the same.

-------------

PR: https://git.openjdk.java.net/jfx/pull/432

Reply via email to