On Wed, 25 Sep 2024 11:31:38 GMT, Alexey Ivanov <[email protected]> wrote:

> Removes the wildcard bound from 
> `PassFailJFrame.PositionWindows.positionTestWindows` so that implementing the 
> interface is simpler as one don't have to remember to declare the 
> `testWindows` parameter as `List<? extends Window>` — just use `List<Window>`.
> 
> It is a backwards compatible change, all the tests which use `List<? extends 
> Window>` continue to compile successfully.

You can test this change with tests from #21180 `DefaultFrameIconTest.java` 
and/or `MenuCrash.java`.

The tests declare the first parameter to `positionTestWindows` as `List<? 
extends Window> testWindows`. If it were declared as `List<Window> 
testWindows`, the test would not compile with the current version of 
`PassFailJFrame`.

Removing the wildcard lower bound from 
`PassFailJFrame.PositionWindows.positionTestWindows` makes it possible to use 
the `List<Window>` type in tests.

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

PR Comment: https://git.openjdk.org/jdk/pull/21181#issuecomment-2373864729

Reply via email to