JDK-8267121 : Illegal access to private "size" field of ArrayList from build.gradle
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 8,openjfx11,openjfx17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-05-13
  • Updated: 2021-08-19
  • Resolved: 2021-05-17
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 8 Other
8u311Fixed openjfx11.0.13Fixed
Related Reports
Blocks :  
Description
The fetchExternalTools() method in build.gradle accesses ArrayList.size instead of ArrayList.size() in two places. This is clearly a bug, but Groovy is happy to provide access to that field via reflection.

Starting in JDK 16, with default strong encapsulation, this no longer works, so we need to fix this before switching, and we really should fix it anyway, since accessing the internal field is both unnecessary and wrong.

Comments
Changeset: 9c97d9b2 Author: Kevin Rushforth <kcr@openjdk.org> Date: 2021-05-17 13:01:15 +0000 URL: https://git.openjdk.java.net/jfx/commit/9c97d9b21232a67a10debdc8dc3b10c419780f7a
17-05-2021