Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8267121

Illegal access to private "size" field of ArrayList from build.gradle

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, openjfx11, openjfx17
    • Fix Version/s: openjfx17
    • Component/s: javafx
    • Labels:

      Backports

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kcr Kevin Rushforth
                Reporter:
                kcr Kevin Rushforth
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: