JDK-8210092 : Remove old javafx.swing implementation
  • Type: Bug
  • Component: javafx
  • Sub-Component: swing
  • Affected Version: openjfx12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-08-28
  • Updated: 2021-09-15
  • Resolved: 2018-09-27
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.
Other
openjfx12Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Duplicate :  
Relates :  
Description
As part of implementing JDK-8195811, the implementation of JavaFX / Swing interop was refactored to allow for two implementations, the "old" (pre-JDK 11) implementation that relies upon qualified exports of internal Swing and AWT packages, and a "new" (JDK 11) implementation that uses a public API in the jdk.unsupported.desktop module.

Once openjfx requires JDK 11 to build and run (see JDK-8209966), we can remove the old implementation and the associated build logic needed to support it.

The main tasks will be:

1. Remove the 'oldimpl' package as well as the reference to it from the InteropFactory

2. Unconditionally use jdk.unsupported.desktop from module-info in javafx.swing:
   a. Move the javafx.swing module-info.java back into src/main/java
   b. Remove the build logic that copies module-info.java into gensrc and uses it from there
   c. Change "requires static jdk.unsupported.desktop" to simple "requires jdk.unsupported.desktop" [*]

3. Remove the support for building and running the 'oldimpl' package:
   d. Remove the build logic that optionally excludes "newimpl" at compile time
   e. Remove dependencies/java.desktop/module-info.java.extra
   f. Remove the qualified exports of the 6 internal java.desktop packages from build.gradle
   g. Remove the HAS_UNSUPPORTED_DESKTOP flag


[*] This will have the advantage of not forcing developers to explicitly include jdk.unsupported.desktop in a custom jlinked image when including the javafx.swing module, which is a bug reported in JDK-8210759.
Comments
Changeset: 6717508716f7 Author: kcr Date: 2018-09-27 13:38 -0700 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/6717508716f7 8210092: Remove old javafx.swing implementation Reviewed-by: psadhukhan, mchung, alanb, jvos
27-09-2018

Review on GitHub: https://github.com/javafxports/openjdk-jfx/pull/207
21-09-2018

I verified that the JDK-8210759 is fixed by the fix for this bug.
21-09-2018

As mentioned in the description, this is expected to fix JDK-8210759. Once this is verified then JDK-8210759 can be closed as a duplicate of this bug.
21-09-2018