JDK-8340899 : Remove wildcard bound in PositionWindows.positionTestWindows
  • Type: Bug
  • Component: client-libs
  • Affected Version: 22,24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-09-25
  • Updated: 2024-10-25
  • Resolved: 2024-09-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 21 JDK 23 JDK 24 JDK 8
11.0.26-oracleFixed 17.0.14-oracleFixed 21.0.6-oracleFixed 23.0.2Fixed 24 b18Fixed 8u441Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Currently, PassFailJFrame.PositionWindows.positionTestWindows declares its testWindows parameter with the type of List<? extends Window> which was introduced in JDK-8294156 and later made available in JDK-8340210.

Internally, the window list is a simple List<Window>.

The wildcard is useful for the return type of the createTestUI method in WindowListCreator so that the code in a test could use List<JFrame> instead of List<Window> as well as pass Frame or JFrame.

By the time, PositionWindows.positionTestWindows comes into play, List<Window> is enough.


The type of PositionWindows.positionTestWindows can be changed to List<Window>.

It is a backwards compatible change, any test which declared its method for positionTestWindows with List<? extends Window> continues to compile successfully.

Yet the opposite is not true: List<Window> isn't compatible with the current List<? extends Window>.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk17u-dev/pull/2998 Date: 2024-10-23 15:07:57 +0000
23-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1086 Date: 2024-10-23 15:07:02 +0000
23-10-2024

Fix request [17u,21u] I backport this for parity with 17.0.14-oracle,21.0.6-oracle. No risk, only a test change Clean backport. Executed a test using PassFailJFrame to check.
23-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk23u/pull/170 Date: 2024-10-14 20:06:43 +0000
14-10-2024

Fix Request for 23u This update allows for simpler code in manual tests with multiple windows. Risk: Low
07-10-2024

Changeset: e2626db2 Branch: master Author: Alexey Ivanov <aivanov@openjdk.org> Date: 2024-09-26 11:34:30 +0000 URL: https://git.openjdk.org/jdk/commit/e2626db2f00d0cc9f3ff8ea374a1ccc89373e398
26-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21181 Date: 2024-09-25 11:31:38 +0000
25-09-2024