JDK-8250558 : ��� Many JavaFX classes have implicit no-arg constructors
  • Type: Task
  • Component: javafx
  • Sub-Component: other
  • Affected Version: openjfx15
  • Priority: P3
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2020-07-24
  • Updated: 2020-09-03
  • Resolved: 2020-09-03
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
openjfx16Resolved
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Description
Umbrella task to track the set of public classes in public packages with implicit (default) no-arg constructors. In a library such as JavaFX this is always an unintentional mistake.

We should evaluate each of these and add an explicit constructor with a basic javadoc comment.

If there are any that should not have been exposed as public constructors, as was the case with JDK-8229472 / JDK-8240688, then we will need to deprecate them for removal (I doubt this is the case).

The actual bugs that we will file to add the default constructors will be tracked by separate linked blocking bugs.
Comments
I filed JDK-8252782 to enable the "missing-explicit-ctor" lint option by default once we update our build to use JDK 16 as the boot JDK (which will likely be in about 7 or 8 months).
03-09-2020

There are no remaining instances of implicit default constructors. I verified this by doing a build with the "missing-explicit-ctor" lint property as shown above.
03-09-2020

I ran the following test build using JDK 16 and the new lint flag: JDK_HOME=$JDKS/jdk-16 gradle --info -PLINT=missing-explicit-ctor sdk As of today, the only classes with implicit no-arg constructors are: javafx.css.Selector javafx.css.converter.ShapeConverter which will be deprecated for removal by JDK-8252387. That bug is the last linked blocking bug, so after it is fixed, I will resolve this umbrella task as Delivered.
02-09-2020

The attached list was generated by a preliminary patch for JDK-8071961 which adds a javac lint option to detect this case.
24-07-2020